▲ | middayc a day ago | |
Yes, Rye follows REBOL in this case. Plain block invocation doesn't create it's own scope / context. That holds for do, if, either, loop, for, map, etc. It would be costly to have this on by default. If you want separation there are many ways to achieve it. Rye has many functions related to contexts / scopes. For creating contexts in multiple ways and evaluating code inside contexts or with context as parent or isolated context, etc. And a lot of builtins directly accept anonymous functions in place of blocks of code. For example for loop also accepts function if you want separation and don't mind the cost.
|