3 ms·
Oh local variables in languages like Forth or Factor are handy. I have not yet gotten used to stack-shuffling. Will I ever? :D
by johnisgood 7y ago
Oh local variables in languages like Forth or Factor are handy. I have not yet gotten used to stack-shuffling. Will I ever? :D
- Risord 7y agoDon't have experience about stack oriented languages nor sure is this relevant reply. But to clarify: local mutable variables are fine because effect of changing value is clear due well specified scope. Mutation is not observable from outside of a function. Opposite is true for using mutable data structures (with immutable variables): scope of effect must be checked manually, it's easy to leak function abstraction and with 3rd party code all the bets are off.