3 ms·
"Go does not support immutability declarations." Doesn't Go have constants (const) which are immutable? What am i getting wrong here?
by xkarga00 12y ago
"Go does not support immutability declarations."
Doesn't Go have constants (const) which are immutable? What am i getting wrong here?
- dbaupp 12y agoThose are just compile time constants, you cannot have a value computed at runtime stored in an immutable variable (i.e. one the compiler will complain about if you attempt to mutate it, to assist with program correctness).
- oscargrouch 12y agomaybe he means a immutable var.. assign once, and never changes.. its not the same as the const construction in Go