On Thu, 2007-09-20 at 00:35 +1000, skaller wrote:
> On Wed, 2007-09-19 at 16:45 +1000, skaller wrote:
> Now .. whilst coding this I am thinking on this one:
>
> fun f(a:int, b:int) ..
> fun f(x:int, y:int)
>
> f(x=1, y=2) //calls the second b
OK, I'm looking at this. Some thin
On Wed, 2007-09-19 at 16:45 +1000, skaller wrote:
> Anyhow .. this CAN be done.
And now has been:
/
#import
var x = struct {a=1; b=2; };
println q"a=$(x.a), b=$(x.b)";
var y = (a=3, b=4);
println q"a=$(y.a), b=$(y.b)";
struct X { aa:int; bb:int; };
val k
On Tue, 2007-09-18 at 22:45 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> > Well, they're not interchangeable since (1,2) doesn't specify
> > any labels.
>
> Thats okay. Are you planning on implementing it?
>
> > in any case this now works:
>
> Cool! Oh, do you
On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> Well, they're not interchangeable since (1,2) doesn't specify
> any labels.
Thats okay. Are you planning on implementing it?
> in any case this now works:
Cool! Oh, do you think we could declare types this way too? Maybe:
typedef foo = (a:int, b:
On Tue, 2007-09-18 at 22:02 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> > On Tue, 2007-09-18 at 21:04 -0700, Erick Tryzelaar wrote:
> > > On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> >
> > > The tildes are probably the easiest to read and notice.
> >
> > Exc
On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> On Tue, 2007-09-18 at 21:04 -0700, Erick Tryzelaar wrote:
> > On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
>
> > The tildes are probably the easiest to read and notice.
>
> Except ~ means complement as an operator and 'destructor' in
> C++, but the
On Tue, 2007-09-18 at 21:04 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> The tildes are probably the easiest to read and notice.
Except ~ means complement as an operator and 'destructor' in
C++, but the issue is more with the calling syntax IMHO.
--
John Skal
On Tue, 2007-09-18 at 21:04 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> Now that would be useful. We might need a prefix to those values
> though, so then we could use this in function declarations. This may
> help to distinguish between a function taking a tup
On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> > 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 cou
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
> >
> > (
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
On Tue, 2007-09-18 at 13:23 -0700, Erick Tryzelaar wrote:
> On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> > you can see the parser is using it .. :)
>
> Hey! that's cheatin!
For my next trick .. it would be nice if you could do
struct X { int a; int b; };
val x = X { a=1; b=2;
On 9/18/07, Erick Tryzelaar <[EMAIL PROTECTED]> wrote:
> I like that. _ctor_int was useful but this should be more clear to new folks.
btw, have you removed support for the _ctor_int magic?
-
This SF.net email is sponsored b
On 9/18/07, skaller <[EMAIL PROTECTED]> wrote:
> you can see the parser is using it .. :)
Hey! that's cheatin!
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.at
On Tue, 2007-09-18 at 13:05 -0700, Erick Tryzelaar wrote:
> On 9/18/07, Erick Tryzelaar <[EMAIL PROTECTED]> wrote:
> > I like that. _ctor_int was useful but this should be more clear to new
> > folks.
>
>
> btw, have you removed support for the _ctor_int magic?
On the contrary:
sctor_definit
I like that. _ctor_int was useful but this should be more clear to new folks.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/di
16 matches
Mail list logo