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

I don't know, variable decelerations seem to me to be funny but useful.

I mean constant constants, constant variables, and variable variables seem useful.

I'm not sure how would variable constants be useful.

Also, anybody knows the difference between constant constant and immutable data (constant contact constant)?




In the normal case, Alice can write 'const const true = false' and Bob, on a second machine, can write 'const const true = 7', and there will not be an error. But if Alice writes 'const const const true = false', than Bob can't reassign or mutate 'true' without throwing an error. It's for truly global constants


Come to think of it, package registries are sort of “superglobal” in many languages. It’s not entirely far-fetched to imagine a language in which variables themselves can be super-global. Heck, MUMPS global variables are immediately persisted to disk and visible to all other processes - and that’s a real language used in real systems!


It's a rather straightforward dig at C\C++ which work exactly like this with `const` variables.




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

Search: