is it considered normal?
# announcements
v
is it considered normal?
s
vaskir: yes anything more than Pair/Tuple, you should use data class.
v
Should? Why? Kotlin does not have anonymous classes / records, so forcing developers to define a data class every time he wants to return multiple values looks a bit strange.
s
I would say it’s a code smell if you want to return more than 2/3 entries from a function and qualifies them to use in data class. I agree, there is no generic way and you might end up creating different data classes.