More fun with undefined

Brendan Eich brendan at mozilla.com
Fri Jun 15 04:41:09 PDT 2012


This isn't unrelated. If we do get patterns into Harmony they may 
subsume some of the postfix-?? (which does not work syntactically, IMHO) 
or prefix-? ideas. Or at least prefix-? may show up in the pattern 
language (dherman and I have discussed it).

Syntax design requries global oversight, there are cross-cutting 
concerns and different complexity budgets to bean-count (but never too 
locally or blindly).

/be

T.J. Crowder wrote:
> On 15 June 2012 08:09, Andreas Rossberg <rossberg at google.com 
> <mailto:rossberg at google.com>> wrote:
>
>     On 15 June 2012 01:22, Allen Wirfs-Brock <allen at wirfs-brock.com
> <mailto:allen at wirfs-brock.com>> wrote:
> > A wonder if this wart is hairy enough, that we wouldn't be
>     justified in some
> > explicit backwards compatibility hackery in the spec. to remove it.
> >
> > For example, we could allow it to appear in parameter lists and
>     provide a
> > dynamic check to ensure that nothing (other than a real
>     undefined) is
> > passed.  Similarly we could explicitly allow:
> >       var undefined;
>
>     Actually, for very much the same effect, you could simply treat
>     'undefined' as a (refutable) _pattern_ that is only matched by the
>     undefined value. No need to make special rules for var or parameters
>     then.
>
>
> Folks, could we move the unrelated discussion to its own thread? This 
> thread's original subject is rather getting lost here.
>
> -- T.J.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list