mwerschy
01/08/2018, 9:30 AMRandomBK
01/09/2018, 5:32 AMinterface A : List<List<String>>
interface B : MutableList<MutableList<String>>, A
Effectively, taking the readonly/mutability divide one step further into generic parameters. With a construct like this, I can control mutability deeply for a container, rather than just at the shallow level of the container itself. I ended up creating a workaround for this by copying the declarations and extension methods in MutableList
, MutableContainer
, etc. into my own custom implementations so that I never implement the same interface twice