strawman for the := operator

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Aug 9 11:06:18 PDT 2012


On Aug 9, 2012, at 10:52 AM, Matthew Robb wrote:

> I'd first like to state that I am extremely interested in having some construct for the described intention behind the := operator
> 
> Based on the discussion here what comes to mind would be having the following instead
> 
> Object.assign(obj, {...});
> same as
> obj.{...};
> 
> Object.define(obj, {...});
> same as
> obj:{...};

Unfortunately, this would be ambiguous with 
    label: { /*a block */ };


> 
> Specific method names for the Object.* could be decided upon. Would also be nice, following the above, to have the following
> 
> obj:prop = value;

same here

Allen

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120809/2311e7f5/attachment.html>


More information about the es-discuss mailing list