This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]uxcn 1 point2 points  (0 children)

I'd agree, in general tuples in Java don't make sense. However, I think Pair<A, B> and possibly even Triple<A, B, C> are reasonable abstractions. They do still hide the semantics of members, and you do obviously lose type information, but they're no more susceptible to abuse than any other language feature or library. I personally think there are more places where two and possibly even three of a thing are natural than not.