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

Interestingly scala makes the choice fairly explicit - val or var - your choice. In practice I find I default to using val - as I know when I debug I only have one place to look for where the value is, and there is generally less cursing when a value mysteriously changes (it doesn't).

(Java has final, and C# has 'const' which is kinda similar). Although in their case you have to choose extra verbosity, but its often worth it.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: