louiscad
06/04/2019, 9:00 PMcontentEquals a while ago: https://youtrack.jetbrains.com/issue/KT-26499
You can add your vote.elizarov
06/04/2019, 9:06 PMbasher
06/04/2019, 10:13 PMdata class NonEmptyList<T>(val values: List<T>)
then you throw in init if the list is empty.
That's the use case that comes to mind for me anywayPavlo Liapota
06/05/2019, 5:16 AMList, not Array 🙂thana
06/05/2019, 5:56 AMelizarov
06/05/2019, 6:03 AMbasher
06/05/2019, 2:56 PMPavlo Liapota
06/05/2019, 3:07 PMequals() of a List compares elements and toString() shows elements, but it does not like that for arrays.
arrayOf(1) == arrayOf(1) // false
listOf(1) == listOf(1) // truelouiscad
06/05/2019, 3:14 PMList means performance hit due to autoboxing and you don't need variable size or read-only defense.elizarov
06/05/2019, 3:21 PM