5 ms·
Scala has had this for ages. You can have it today. Even in Java either through the Google collection library or through a library that mimics fp style programm
by spockz 4y ago
Scala has had this for ages. You can have it today. Even in Java either through the Google collection library or through a library that mimics fp style programming. The name eludes me for the moment.
- gowld 4y agoGuava, but it's not fully typesafe. Mutable is not part of the Java meta-language used for typing. ImmutableMap implements Map https://guava.dev/releases/23.0/api/docs/com/google/common/collect/ImmutableMap.html https://guava.dev/releases/23.0/api/docs/com/google/common/c... and throws exceptions on mutation. https://guava.dev/releases/23.0/api/docs/src-html/com/google/common/collect/ImmutableMap.html#line.494 https://guava.dev/releases/23.0/api/docs/src-html/com/google...