Star-dot operator in Kotlin


#1

Are there plans for such functionality?

For example in Groovy I can write something like that:

["aaa", "bbb", "ccc"]*.length()

that returns

[3, 3, 3]


#2

This functionality doesn't seem to be very useful. The syntax you mention has very little advantage over

``

arrayList(“aaa”, “bbb”, “ccc”).map {it.length()}


#3

Star-dot seems to be useful for longer chains: events*.organizer*.email*.domain

instead of

events.map { it.organizer }.map { it.email }.map { it.domain }


#4

Yes, but you can say   events.map {it.organizer.email.domain}  and it will be more efficient and star-dot operator is not required..

But I still think it’s a bit overcomplicated… star-dot operator looks more clear