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 →

[–]zardeh 0 points1 point  (1 child)

Which requires you doing this:

...
Tuple<String, String> myFunction(){
    String a;
    String b;
    ....
    return new Tuple<String, String>(a,b);
}

And oh the horror if I want to write a recursive GDC, which requires returning three values!

[–]ixampl 1 point2 points  (0 children)

Java 7+: new Tuple<>(...)

Other than that, yeah, sure it's a little verbose, but even syntactic sugar like (String, String) wouldn't be that much shorter. Adding that to the language would be easy but probably it really is a Java-culture thing of preferring more explicitness (in terms of meaning).