domenic at domenicdenicola.com (2013-12-10T01:46:39.405Z)
On Tue, Dec 3, 2013 at 9:13 PM, Waldemar Horwat <waldemar at google.com> wrote:
> `a^^b` would essentially be the same as `!a!=!b` except that it would return
> the actual truthy value if it returns true.
Those semantics are extremely error-prone. `(("foo" ^^ "bar") ^^ "baz") !==
("foo" ^^ ("bar" ^^ "baz"))`, and I doubt anyone will remember which
corresponds to `"foo" ^^ "bar" ^^ "baz"`?
Also, the syntax gives the impression that this is a short-circuiting
operator since it is a "doubled bitwise operator" like `||` and `&&`, but it
can't be short-circuiting.
On Tue, Dec 3, 2013 at 9:13 PM, Waldemar Horwat <waldemar at google.com> wrote: > On 12/03/2013 05:30 PM, Mark S. Miller wrote: > >> What's ^^ ? >> > > a^^b would essentially be the same as !a!=!b except that it would return > the actual truthy value if it returns true. Those semantics are extremely error-prone. `(("foo" ^^ "bar") ^^ "baz") !== ("foo" ^^ ("bar" ^^ "baz"))`, and I doubt anyone will remember which corresponds to `"foo" ^^ "bar" ^^ "baz"`? Also, the syntax gives the impression that this is a short-circuiting operator since it is a "doubled bitwise operator" like || and &&, but it can't be short-circuiting. -- Sean Silva > > > Waldemar > > _______________________________________________ > es-discuss mailing list > es-discuss at mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131204/85fe4105/attachment.html>