Add a better explanation of using dynamic rules for scoping structures (1)
The “Tour” on the Spoofax website currently only explains how to use dynamic rules for the entities language. The NWL language could make a good example of how to do it when you have scopes.
Submitted by Lennart Kats on 25 February 2010 at 08:21
Issue Log
We should rethink the need for this. With NBL, the need for dynamic rules decreases. When you still like to remember things, you can use the index nowadays. In the current CC lab, students store everything in the index instead of using my old library, which was made to hide dynamic rules from them.
Isn’t it because every young coder knows how to use an hashmap? And because the lack of examples about dynamic rules?
Hashmaps do not solve the issue, because you have to pass them around and you have to either encode scoping in keys (like the index does) or maintain scoped hashmaps.
Scoping should be expressed with NBL; dynamic rules are not relevant for this purpose anymore.
Log in to post comments