The way scala has 22 tuples is a big scala smell actually. At least,
to me. Anytime I look at scala's javadoc, you see 22 TupleX's fly by.
Meh.

On Feb 10, 2:48 am, Michael Neale <[email protected]> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to