Let's replace <| with :: (was Breaking up the <|...)

François REMY fremycompany_pub at yahoo.fr
Sat Mar 17 09:55:22 PDT 2012


Wouldn't it be better to use 'as' for guards? Seems more intuitive and 
easier to type

    let A as Number = 3;
    let B as Email = "xant at google.com";

    class ListNode {
        public nextNode as ListNode;
        public value; // no guard
    }

However, it is'nt a reserved keyword. But I don't think anybody sane would 
use 'as' as a variable name. Additionnaly, we could also require 'use 
guards' like we are going to require 'use fn'.

But the more I think about it, the more I think we should version 
ECMAScript. It would give us much more freedom to innovate without worrying 
about breaking compatibility. However, I don't want to restart a debate 
about that: since it was already decided that it won't happen, it would 
probably be a waste of time.





-----Message d'origine----- 
From: Brendan Eich
Sent: Saturday, March 17, 2012 5:15 PM
To: Allen Wirfs-Brock
Cc: es-discuss
Subject: Re: Let's replace <| with :: (was Breaking up the <|...)

Allen Wirfs-Brock wrote:
> I not recall why we haven't seriously considered :: as an alternative to 
> <|.  It certainly eliminates all the typography issues.

Because we had agreed to reserve :: for guards:

http://wiki.ecmascript.org/doku.php?id=strawman:guards

/be
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org
https://mail.mozilla.org/listinfo/es-discuss 



More information about the es-discuss mailing list