(Map|Set|WeakMap)#set() returns `this` ?

Nathan Wall nathan.wall at live.com
Wed Dec 5 07:06:33 PST 2012

> Date: Tue, 4 Dec 2012 11:03:57 -0800
> From: brendan at mozilla.org
> Subject: Re: (Map|Set|WeakMap)#set() returns `this` ?
> Allen Wirfs-Brock wrote:
> > It's less clear which is the best choice for JS.
> Cascading wants its own special form, e.g., Dave's 
> mustache-repurposed proposal at
> https://blog.mozilla.org/dherman/2011/12/01/now-thats-a-nice-stache/
> so one can write cascades without having to be sure the methods involved 
> follow an unchecked |this|-returning convention.

I really like this possibility. Is there any way of the monocle-mustache making it into ... say, ES7?
If so, it would seem wrong to ever return `this`.  Sounds like you get the best of both worlds to me!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121205/0c01f108/attachment.html>

More information about the es-discuss mailing list