3 ms·
I know this (and even use this occasionally), that's why there are whole separate families of collections in Scala - mutable and immutable collections. And I th
by qwerty456127 8y ago
I know this (and even use this occasionally), that's why there are whole separate families of collections in Scala - mutable and immutable collections. And I think it is possible for the compiler to figure out if a type (e.g. a collection type) is mutable or not given its source code and even if it isn't it probably can be made possible by introducing some sort of special annotations to class definitions.