https://kotlinlang.org logo
Title
n

Nate Emmons

03/17/2021, 3:29 PM
Perhaps it's just as simple as "square braces are syntactic sugar for calling the 'set' method on the given object"?
:thread-please: 1
ah, yeah, that's it. https://spring.io/guides/tutorials/spring-boot-kotlin/ sorry, as usual i find my own answer immediately after asking the question.
c

Casey Brooks

03/17/2021, 3:34 PM
The general term for this in Kotlin is “operator overloading”, and operator functions can be implemented either as member or extension functions https://kotlinlang.org/docs/operator-overloading.html#indexed-access-operator
n

Nate Emmons

03/17/2021, 3:41 PM
Thank you very much for the reference, i appreciate it. That makes perfect sense.
This is a beautiful language
:kotlin-intensifies: 6