Hacker News new | past | comments | ask | show | jobs | submit login

Some languages have immutable bindings too, where you only shadow previous bindings.



If 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.


> 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: