Percha
12/27/2018, 11:14 AMThomas Legrand
12/27/2018, 2:41 PMkyonifer
12/27/2018, 2:49 PMkyonifer
12/27/2018, 2:56 PMaltavir
12/27/2018, 3:59 PMPercha
12/27/2018, 7:01 PMPercha
12/27/2018, 7:06 PMkyonifer
12/27/2018, 7:24 PMkyonifer
12/27/2018, 7:26 PMkyonifer
12/27/2018, 7:30 PMkyonifer
12/27/2018, 7:35 PMkyonifer
12/27/2018, 7:43 PM.T
be an immutable container sub-type. This invariably causes two things to happen:
1) people writing functions must go through all their code and decide which things actually need mutability. invariably half their stuff will need immutable, half will need mutable
2) people using said functions will have to play a guessing game of if what they have is immutable or not. maybe they were passed immutable but they need to call mutable, or vice versa. or maybe they were given mutable but called .T on it or sliced it (got an immutable view), and now they're back to needing mutable again
The result being a hodgepodge of code needing mutable and non-mutable and asMutable() littered everywhere, along with people trying to fiddle with function in/out types to make it work with this or that other function without asMutable
noise everywherekyonifer
12/27/2018, 7:44 PMPercha
12/27/2018, 8:20 PMasMutable
function for those cases. On my experience, this approach worked very well for me, I'm using numeriko on my projects and it feels very natural to have the distinction just like with List and MutableList. I understand this distinction will make non-Kotlin programmers change their habits, so it's important we have the discussion.