Join Slack
Powered by
Perhaps it's just as simple as "square braces are ...
# getting-started
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"?
đź§µ 1
Nate Emmons
03/17/2021, 3:30 PM
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.
Nate Emmons
03/17/2021, 3:42 PM
This is a beautiful language
K 6
3
Views
Open in Slack
Previous
Next