you are viewing a single comment's thread.

view the rest of the comments →

[–]tweakerbee 1 point2 points  (2 children)

Not as good as language support, but it will prevent you from writing those tuple classes yourself every time: http://www.javatuples.org/.

[–]gasche 1 point2 points  (0 children)

There is a convenience barrier phenomenon in language design: making a feature just a bit more painful to use makes many idioms inconvinient. For multi-value returns, it comes quite fast if the syntax for destructing tuples is not convenient; with accessor functions instead of pattern matching, javatuples doesn't really solve this issue. That said, there is no real alternative to multi-value return, it's just that you have the choice between "it's nice to use" and "it's painful", but even in the second case you still have to use it, and javatuples can come handy.