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

Is there something in Scala that prevents one man's "val" from becoming another man's "var"?

Not that I don't wish we could swap tired old Java for Scala at work, but I worry that opt-in immutability means somebody will opt-out and foul things up in Scala, as well :-(

For languages (e.g. - Scala, Nim) that have separate keywords for declaring/initializing immutable and mutable symbols, I wish they would avoid short words like "var" for mutable identifiers, maybe using a keyword like "mutable", "datadivision" or "ipeedinthepool" to discourage mutable data.



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

Search: