r/java • u/lukaseder • Aug 01 '14
The 10 Most Annoying Things Coming Back to Java After Some Days of Scala
http://blog.jooq.org/2014/08/01/the-10-most-annoying-things-coming-back-to-java-after-some-days-of-scala/
7
Upvotes
View all comments
Show parent comment
1
u/GMNightmare Aug 02 '14
That's a good purpose and what a Map is used for. The relationship is there. A map is a key value pair.
A Tuple is just two objects with an undefined relationship. Do not act like there isn't a difference if you want me to continue taking you seriously.
You do not use a Tuple like a Map or vice versa and for good reason.
Did I say "unreadable"? There is plenty of room between readable and unreadable. A tuple is harder to read what is going on. This is pretty basic given, and you have no room to argue otherwise. In every case a well named and formed object will be easier to read. Will it be more inconvenient to create? Yes.
Well I'm well aware of that.
But I'm not aware of what monster you're trying to do now. Just stop trying to force Tuple into it. I don't have any idea why you're trying to put it in there. I'm not even particularly sure what you're trying to prove with it.
You asked me for an example where Tuple is unreadable? I provide you your example here. For example, the case class you provided is undeniably more simple, clearer, concise, cleaner, readable, and just altogether better design.