Closed rocky closed 10 years ago
I'm pretty sure this is my fault https://github.com/0xfaded/go-interactive/blob/master/interpreter.go#L51
I converted to an Interface() as a workaround so I could use the append() function. I didn't understand the error message when the straight reflect.Value was in there.
I think I would find knowing both the kind and type useful when playing with third party libraries. Up to you though
type information is a superset of kind isn't it?
Well, strictly speaking a type is a set of values, and a kind is a set of types. So yes, information about a type could also imply it's kind. But for practical purposes, I would like to see something like
type = Named(int)
for named types.
This is now done in the demo code in those cases where Kind is not the same thing as Type.
Why this?
I don't understand why this comes back interface rather than some sort of int. And should we be showing Kind or the type? Thoughts?