Youssef Shoaib [MOD]
04/25/2023, 5:52 AMVecX types that are mutable vectors, and I'm struggling to find a name for a new read-only Vector type that they should implement. I'm thinking maybe ReadOnlyVecX but it seems to be too long. The issue is that changing the name of VecX to MutableVecX would be a big change, especially considering that most Vec-based code would be using mutability, while the read-only versions likely will be used to specify that method parameters and results can't be modified.
I also thought maybe VecXVals could be an apt name since the interface would really only define the `val`s required to represent that vector, but it still doesn't seem elegant enoughEmil Kantis
04/25/2023, 5:59 AMReadOnlyVecX or ImmutableVecX imo. Its not really that long imo, and IDEs should complete most of it for you anyway.Youssef Shoaib [MOD]
04/25/2023, 6:01 AMImmutableVecX but it's misleading because the type won't actually be immutable.Ruckus
04/25/2023, 6:10 AMVecXView could work (or another word like preview, window, copy, etc).Youssef Shoaib [MOD]
04/25/2023, 6:32 AMVecXView as a way of getting a live-updated vector.
The more I think about it, the better the name works. I could then have VecXMutableView for the read-write version of that type that basically internally holds a bijection of sorts to convert back and forth.
I think I'm gonna go with VecXView unless I get an epiphany of a better name. Thank you!mcpiroman
04/25/2023, 8:48 AMList and MutableList)ephemient
04/26/2023, 1:34 AMUnmodifiableFoo
|- MutableFoo
\- ImmutableFoo
\- PersistentFoo
you want, and then maybe give a shorter name to the most common one of themephemient
04/26/2023, 1:34 AMUnmodifiableList (which it calls List) and MutableList, with `ImmutableList`/`PersistentList` being supplied by kotlinx.immutableephemient
04/26/2023, 1:37 AMscala.collection.Seq
|- scala.collection.mutable.Seq
\- scala.collection.immutable.Seq
which is also a choice you could make