@nelson.altares_8403 Like there are n number of ways to do one thing, Similar way, you can use data class or this way to do the same thing.

People like me prefer this thing because you don't need to define a separate class. It's similar to reusing an existing class for the same purpose. Pair and Triple are used for that only. Defining a new class just to pass data doesn’t make sense at all.


Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store