We break down how, in Kotlin, the square-bracket syntax is turned by the compiler into calls to
get/
set, and why the
operator modifier is needed. We look at indexers in the standard library (
List,
MutableList,
Map,
MutableMap), design our own indexers using the sample learning app
BudgetBuddy, discuss contracts (fail-fast vs nullable), and the multi-index variant
obj[i, j].