Thanks! I'm not familiar with the apple world at all, but from your description it sounds like Kotlin does the same thing - there's Set<T> which is immutable, and MutableSet<T> which extends Set<T> and adds methods such as add(T) and remove(T). In general, I think this is good practice, it works really well in Kotlin and conveys a lot more information than in Java, where you only have one Set<T> interface, and it may or may not be modifiable for you.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks! I'm not familiar with the apple world at all, but from your description it sounds like Kotlin does the same thing - there's
Set<T>
which is immutable, andMutableSet<T>
which extendsSet<T>
and adds methods such asadd(T)
andremove(T)
. In general, I think this is good practice, it works really well in Kotlin and conveys a lot more information than in Java, where you only have oneSet<T>
interface, and it may or may not be modifiable for you.