Macro Variable Declaration
- Dominant language
- Scala
- Stars
- 279
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Millfork does not support declaring new variables inside of macros. What is the reasoning behind that? Are there non-trivial issues with collisions that don't occur in "normal" scopes (I'm assuming the primary concern is the variable scope extending beyond the macro)?
Regardless of the answer here, can we get errors on variable declaration within macros? I have hit several scenarios where I forgot about variable declarations when converting a function to a macro, and using the newly declared variable results in the opaque error ```Exception in thread "main" millfork.env.UndefinedIdentifierException: Variable `variable` is not defined```, which doesn't give a clear indication of where the usage exists.
Contributor guide
Assessment
This issue has not been assessed yet.