On Thu, May 15, 2014 at 8:47 PM, Rick Waldron <[email protected]> wrote:
> I imagined .= would do both, but I don't think my suggestion should be taken
> seriously. In fact, your example illustrates a major flaw (that exists in
> either proposal/suggestion), that I don't immediately know how I would
> answer:
>
> var o = { foo: "bar" };
> o .= foo;
>
> Is `o` now a string with the value "bar"?? I think that would cause more
> problems than its worth.

Yes, that's exactly what it would do.  This sort of pattern is even
reasonably common when doing tree-walking, for example: you see a lot
of "node = node.left;" or whatnot.

~TJ
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to