Skip to content

Language Debt

medium.com
3 pointsjordwalke1 comment
On HN

Comments

The Rise Of Immutability

Every language (except some special languages were immutability doesn't make any sense perhaps) should have first-class immutable values declaration support. In the majority of cases when I define (e.g. in C# or Python) a variable I don't mean to ever change it (I only introduce it for sake of the code readability and to re-use the value in multiple places later), if it accidentally gets changed that's a bug. That would be wonderful if I could always define these as immutable the way I do with the `val` keyword in Scala and get a compiler/interpreter report an error once it notices unintentional re-assignment.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.