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

"Constant" is ambiguous. Depending on who you ask, it can mean either:

1. A property known at compile time.

2. A property that can't change after being initially computed.

Many of the benefits of immutability accrue properties whose values are only known at runtime but which are still known to not change after that point.



DotNet/C# makes this distinction in the form of (1) const and (2) readonly.




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

Search: