Scala has tuple classes up to size 22 included in the base langauge package. The (var1, var2, ...) syntax gets compiled into an instantiation of the properly sized Tuple class.
Michael Neale wrote: > So how would you do it in scala ;) ? > > (sorry I always find it crushing how easy everything is in scala, when > I have to look at java). > > Of course you can just do: > > def foo() : (String, Int) = ("Hello", 42) > > never looking into what scala *actually* does with tuples, if its > something nasty or not... (someone else I am sure knows if it is a > good or bad thing). > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to javaposse+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---