ES4 stable draft: object initializers

Brendan Eich brendan at mozilla.org
Thu Apr 17 14:13:24 PDT 2008


On Apr 17, 2008, at 4:06 PM, Jeff Dyer wrote:

> The catchall syntax seems heavy handed for the use cases it serves.  
> It introduces new syntax, not just special meaning for ‘meta’  
> qualified names, and it is otherwise possible to create object  
> values with catchalls by using classes.
>
> I propose that we remove the productions that begin with  
> “meta::get”, “meta::set”, “meta::has”, “meta::delete” and  
> “meta::invoke”.

These are wanted by Ajax library hackers, jresig and shaver testify.  
Rather than cut a long-standing proposal because a recent evolution  
of its *syntax* (not its substance) led to something problematic, why  
not return to the original syntax:

obj = {get *(id) ..., set *(id, value) ...};

If on the other hand, the syntax is heavy either way, but the  
substance is valuable because the use-cases are compelling enough to  
serve, then we can stick with meta::get, etc.

/be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080417/f65b659e/attachment-0002.html 


More information about the Es4-discuss mailing list