Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
JDriven
JDriven
@jdriven@mastodon.social  ·  activity timestamp 2 days ago

Kotlin protip: indexed access operator overloading with multiple indices
A blog by @riccardo

Operator overloading is one of Kotlin’s most beloved features. It lets you give familiar syntax to custom types, and you’re probably already using it without even noticing it. Take the Map interface, for example: the indexed access operator ([]) is used to read and write entries: val m = mutableMapOf() m[1] = "one" // m.put(1, "one") val...

#dev #softwaredevelopment #kotlin

https://jdriven.com/blog/2026/02/Kotlin-protip-indexed-access-operator-overloading/

JDriven Blog

Kotlin protip: indexed access operator overloading with multiple indices

Operator overloading is one of Kotlin’s most beloved features. It lets you give familiar syntax to custom types, and you’re probably already using it without even noticing it. Take the Map
  • Copy link
  • Flag this post
  • Block

BT Free Social

BT Free is a non-profit organization founded by @ozoned@btfree.social . It's goal is for digital privacy rights, advocacy and consulting. This goal will be attained by hosting open platforms to allow others to seamlessly join the Fediverse on moderated instances or by helping others join the Fediverse.

BT Free Social: About · Code of conduct · Privacy ·
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Code of Conduct