[nem-en] Re: Where to apply type arguments
Andrey Khropov
andrey.khropov at gmail.com
Tue Jan 30 16:04:11 CET 2007
Vladimir Reshetnikov wrote:
> Kamil Skalski <kamil.skalski <at> gmail.com> writes:
>
> >
> > All those mean different things:
> > (int * int) * int tuple (of tuple (of int,int) and int)
> > etc.
> >
>
> Has it any practical meaning?
Of course. Because tuples can have tuples as an element. I see no reason to ban
this.
I see tuples as a lightweight structures with fields without names.
> IMO, it would be more consistent, if compiler "flatten out" such nested
> tuples. What do you think?
NO, it's just doesn't make any sense. (T1*T2)*T3 and (T1*T2)*T3 are different.
It's like saying
struct A[T1,T2] { x : T1; y : T2; }
struct B[T1,T2] { x : T1; y : T2; }
and
A[B[T1,T2],T3] is the same as A[T1,B[T2,T3]]
--
AKhropov
More information about the devel-en
mailing list