grammar update

Dave Herman dherman at ccs.neu.edu
Sun Mar 30 22:41:21 PDT 2008


> - Allowing splat expressions in array literals is a nice addition, but
> restricting them to the end of element lists seems unnecessary.  Is
> the purpose uniformity between array literals and array patterns?

Almost: uniformity between array literals and function calls. But 
another issue was typeability-- it won't be possible for a statically 
typed mode to type-check splicing in the middle of an array. But even if 
we allowed splatting in the middle of *both* array literals and function 
calls (though a statically typed mode would reject them), the patterns 
would still probably need to be more restricted, which can be confusing.

Dave



More information about the Es4-discuss mailing list