←back to thread

498 points azhenley | 3 comments | | HN request time: 0.407s | source
Show context
slifin ◴[] No.45769470[source]
Yeah I wish variables were immutable by default and everything was an expression

Oh well continues day job as a Clojure programmer that is actively threatened by an obnoxious python take over

replies(4): >>45770105 #>>45770957 #>>45772455 #>>45772815 #
sunrunner ◴[] No.45770105[source]
As a Python programmer at day job, that is Clojure-curious and sadly only gets to use it for personal projects, and is currently threatened by an obnoxious TypeScript take over, I feel this.
replies(3): >>45770358 #>>45771709 #>>45776003 #
hn_throw2025 ◴[] No.45771709[source]
In the context of the original discussion, TypeScript (and ES6) has const and let.
replies(3): >>45771765 #>>45772007 #>>45772489 #
1. AstroBen ◴[] No.45772489[source]
well yeah except const doesn't make objects or arrays immutable
replies(2): >>45772682 #>>45776864 #
2. catlifeonmars ◴[] No.45772682[source]
I feel that Java’s “final” would have been a better choice than “const”. It doesn’t have the same confusing connotation.
3. MetaWhirledPeas ◴[] No.45776864[source]
Yeah it makes their structure immutable? Something like that. Not useless but not what you would expect.

But for non-objects and non-arrays it's fine.