https://kotlinlang.org logo
#announcements
Title
# announcements
v

vaskir

05/09/2017, 8:58 PM
is it considered normal?
s

suresh

05/09/2017, 9:24 PM
vaskir: yes anything more than Pair/Tuple, you should use data class.
v

vaskir

05/12/2017, 3:43 PM
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

suresh

05/12/2017, 4:04 PM
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.
2 Views