On Tue, 2007-09-18 at 14:09 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> > BTW: I think SML has records but not really tuples, instead
> >
> >         a.member // named component
> >         a.1     // actually 1 is just the name
> >
> > so that
> >
> >         (1,2,3)
> >
> > is just shorthand for
> >
> >         (.1=1, .2=2, .3=3)
> 
> 
> What if we did that? Can we parse X (a=5, b=6)? I think C# and java
> are adding that syntax.

I don't know .. only one way to find out... :)

More precisely, can we parse:

        (a=1, b=2) // anonymous struct = record

Then we could allow X(1,2) to be written X(a=1,b=2), if the compiler
just generates a record->struct constructor as well as the existing
tuple->struct constructor.

BTW: underneath a records, structs, classes and tuples are all
represented by C structs.


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to