Yea it’s difficult to enforce immutability in a scripting language efficiently. In Scala you have val and in Java you have final.

As far as the original rant, you have to use the right tool for the right problem. I love Python and it’s been by go to for a lot of tasks and personal projects. That said, it looks like you’re trying to do something more low level, which might lend itself to something more like C/Rust/Go.

Follow

@djsumdog @array @Pixificial
i think TCL does this very nice (if one ignores the arcane "arrays") and the standard library is consistent. to pass by name/reference you pass the variables name and in the called function use tcl.tk/man/tcl8.7/TclCmd/upvar . so it's always pretty clear when things are read-only (a $value) or can be modified.

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.