df
11/09/2020, 10:06 PMephemient
11/09/2020, 10:07 PM(0..0).toList() == listOf(0)
nanodeath
11/09/2020, 10:07 PM0 upto 0
should be the empty listdf
11/09/2020, 10:07 PMephemient
11/09/2020, 10:07 PM0 until 0
is emptynanodeath
11/09/2020, 10:07 PMCasey Brooks
11/09/2020, 10:08 PMA range defines a closed interval in the mathematical sense: it is defined by its two endpoint values which are both included in the rangehttps://kotlinlang.org/docs/reference/ranges.html#range
Nir
11/09/2020, 10:08 PMnanodeath
11/09/2020, 10:09 PMdf
11/09/2020, 10:09 PMephemient
11/09/2020, 10:09 PMInt.MIN_VALUE..Int.MAX_VALUE
without using inclusive endsNir
11/09/2020, 10:11 PMephemient
11/09/2020, 10:11 PM0 until list.size
0..list.lastIndex
list.indices
and with the last one you don't even need to think about whether the bounds are inclusive or exclusiveNir
11/09/2020, 10:11 PMnanodeath
11/09/2020, 10:12 PM0..(list.size - 1)
before. feelsbad.Nir
11/09/2020, 10:12 PM..
for closed and ...
for open, which I didn't know. Kotlin I suppose could probably very easily choose to add ...
later... not that it's the highest priorityNir
11/09/2020, 10:12 PMephemient
11/09/2020, 10:14 PM..<
for half-open intervals makes it obvious it's not closed, but... I think it's a bit uglyephemient
11/09/2020, 10:14 PMuntil
in Kotlin is fine with me