by amalgamated_inc · 3y ago · 0 comments
arrayOf(1, 2, 3) - why not [1,2,3]?
emptyArray() - why not []?
mapOf("key" to "value") - why not {key => value}?
These are all solved problems. Why would they make up some harshly suboptimal syntax?
The ugly Kotlin syntax is of course just there to look different to Scala, where you would have:
Array(1, 2, 3)
Array.empty
Map("key" -> "value")