Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Those are different concepts. Variables have names, values typically don't. 500 is a value; foo is a variable.


Values that have names are typically called objects (their identity isn't structural). Named values are necessary for having mutable fields (I.e. variables).


Hmm, that doesn't sound right to me, at least not if "name" means "identifier" in the conventional sense (like foo). For example, stack-based languages can do field mutation without names.


Depends if we are talking about local stack or global heap state. If you just want to modify a register, then a locally bound name/index/stack pointer is sufficient. If you want heap allocated aliased (shared) state, you need globally unique names or addresses. The challenge is always with global state, hardly ever with locally scoped state.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: