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
We don't have that much compiler directives and highly likely won't need any more. They can have their own syntax and include message literal syntax inside so we don't have to create a const and bind it, we just pass literal to the #bind
// before
const x int = 42
#bind(x)
some_node SomeNode
// after
#bind(42)
some_node SomeNode
You can however only do that with primitives because it's possible to parse their types from the text. For complex data types you would still have to use const approach. I think it makes it questionable if it worth it. Especially given that compiler directives are a feature for language and stdlib implementors, rather than end-users. Even though they have access to it (it might be useful for e.g. implementing Go-interop)
The text was updated successfully, but these errors were encountered:
We don't have that much compiler directives and highly likely won't need any more. They can have their own syntax and include message literal syntax inside so we don't have to create a const and bind it, we just pass literal to the #bind
You can however only do that with primitives because it's possible to parse their types from the text. For complex data types you would still have to use const approach. I think it makes it questionable if it worth it. Especially given that compiler directives are a feature for language and stdlib implementors, rather than end-users. Even though they have access to it (it might be useful for e.g. implementing Go-interop)
The text was updated successfully, but these errors were encountered: