Re 22: consider the empty product/tuple and suddenly you are in the realm of conspiracy theories. With the functions you actually see the true number -- they explicitly start with 0.
How far is it from the EPFL to Lake Totenkopf? Does either really exist? Who's reality is this anyway? Peter PS: no, we are probably not doomed, it's just the type of comments people deserve for arbitrary cut-offs :-) On Mon, 2009-02-09 at 17:48 -0800, Michael Neale wrote: > Thanks David ! > > 22... interesting... > How did they do the syntactic support for ( and ) to mean Tuple? Is it > special or like anything else, just defs? > > On Feb 10, 11:51 am, David Chuhay <[email protected]> wrote: > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
