Hacker News new | ask | show | jobs
by tmail21 3325 days ago
Cool.

This needs to be built into the language or somehow standardized by the community.

With lack of standardization of immutable collections, there would be lots of different ways that libraries would implement immutability. This would result in losing one of the main benefits of functional programming (i.e. awesome composability).

2 comments

This is already in the language. It is just an interface which makes the common lists only visible as immutable objects. But inside they are a normal list. And in this case the object is read-only, not immutable, as we were discussing in the other comment thread.
Well, that is part of the Kotlin project itself, so I assume it is or will be built in, should the proposal succeed.
Not sure about the governance model of Kotlin. Hopefully it succeeds.