Skip to content
0:00 / 0:00

#kotlin#dataobjects#sealedclasses

Data objects in Kotlin: pretty-print your objects!

Kotlin by JetBrains

100K subscribers • 61 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Sebastian Aigner, Developer Advocate at JetBrains
  • Linked in the descriptionKotlin/KEEP
  • Made by the vendor. The company whose product it covers made or sponsored it.

Intermediate. Assumes working knowledge.

19K views4 years ago1 recommendation

Programming languagesKotlinLanguage design and type systems

Sebastian Aigner demonstrates Kotlin's data objects feature, showing how it improves string representation for object declarations.

Kotlin 1.7.20 comes with a new experimental feature for object declarations that especially improves work with sealed classes. This new feature is called data objects. Adding the “data” modifier to your object declarations ensures they look nice and tidy as a string, just like you’re already used to with data classes, out of the box. Let Sebastian Aigner (twitter.com/sebi_io) show you how this will mean less code, less typos, and more symmetrical definitions for your class hierarchies! Find out more details in the KEEP document for data objects: github.com/Kotlin/KEEP/issues/317

Why it's here

1 person recommends this

What people say. Recommended by the Kotlin team to learn how data objects simplify class hierarchies and reduce boilerplate.

u/Anisim_1Kotlin teamin r/Kotlin • Recommends

Kotlin 1.7.20 comes with a new experimental feature called Data Objects! Let Sebastian show you how using data objects can lead to less code, fewer typos, and more symmetrical definitions for your class hierarchies.👇