You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that gomacro can describe for example imports and functions when using the repl, like:
>import"fmt">fmt// works good>fmt.Sprintf// works good>fmt.State// doesn't work: package fmt "fmt" has no symbol State>uint8// doesn't work: undefined identifier: uint8
It would be nice to get the information, that the type definition exists in the scope, and maybe how it looks like (similar to the output for a func)
The text was updated successfully, but these errors were encountered:
I.e. in gomacro, packages are values - although you can do very little with variables containing a package. I kept this extension because it can be useful for debugging.
In compiled Go, packages are not values - you cannot store them in variables or pass them as function arguments.
I did not add the same extension to types - you cannot store a type in a variable. Thus a single fmt.State or uint8 is not a valid expression.
Thinking about it, adding an implicit conversion from type to value will probably break existing code, as for example uint8(1), which would become ambiguous: it could mean either "convert 1 to type uint8" or "call the function/closure uint8 with the single argument 1"
Maybe I could add a :show special command that works both on expressions and types.
I noticed that gomacro can describe for example imports and functions when using the repl, like:
It would be nice to get the information, that the type definition exists in the scope, and maybe how it looks like (similar to the output for a func)
The text was updated successfully, but these errors were encountered: