←back to thread

498 points azhenley | 2 comments | | HN request time: 0.55s | source
Show context
gethly ◴[] No.45769775[source]
Variable is by definition mutable.

Constant is by definition immutable.

Why can't people get it through their heads in 2025? (I'm looking at you, Rust)

replies(4): >>45769884 #>>45769977 #>>45770214 #>>45770314 #
mirpa ◴[] No.45769884[source]
That depends on your definition. Programming languages often deviate from mathematics when it comes to definition of variables, functions etc. That is by choice, Haskell tried to be as close to mathematical definition as possible.
replies(1): >>45771136 #
1. latexr ◴[] No.45771136[source]
You don’t need to make a mathematical argument, “variable” and “constant” have clear meanings in colloquial use which match the definitions of your parent comment.
replies(1): >>45771465 #
2. devnullbrain ◴[] No.45771465[source]
So does 'parent'.