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

Well, most people learn about variables [1] before variables [2], so I find it funny that you think of the mutable ones as English.

Mutable variables are better explained as slots or cells, I think. Both OCaml and Rust have a concept of ref cells, for example (and they entirely replace mutable local variables in OCaml).

1: https://en.m.wikipedia.org/wiki/Variable_(mathematics) 2: https://en.m.wikipedia.org/wiki/Variable_(computer_science)




F# has ref cells too but they are discouraged in favour of the mutable keyword


I know, inherited from OCaml. I was talking more about which metaphors to push for instead, rather than any actual data structure.




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

Search: