4 ms·
Some languages have immutable bindings too, where you only shadow previous bindings.
by junke 9y ago
Some languages have immutable bindings too, where you only shadow previous bindings.
- joncampbelldev 9y agoIf you can shadow previous bindings then that would also cause no problem for repl re-usage, unless the shadowing syntax is different to the binding syntax. Either way, unrelated to the point in the article about the advantage of immutable values for repl, not immutable bindings. I would certainly agree that truly immutable bindings would be at best quite a stumbling block for repls, but so far no one was advocating for them as a good repl feature.
- dllthomas 9y ago> so far no one was advocating for them as a good repl feature GHCi has this feature, if you explicitly turn it on (-fwarn-name-shadowning with -Werror). I agree that it's not a terribly useful way to run a REPL.