Existential operator (was: ||= is much needed?)
brendan at mozilla.org
Tue Jun 19 15:53:58 PDT 2012
Indeed I did not spec this in
-- one step at a time. Also I'm not sure how the indefinite soak will
fly with others on TC39.
Allen, I agree if we do make a soak and don't spec it as CoffeeScript
realizes it (by translation!) then we're looking at elaborating
Reference semantics. Still smells, but it's the only plausible path if
this is the goal.
More when I have time. Thanks for the feedback.
Jeremy Ashkenas wrote:
> On Tue, Jun 19, 2012 at 3:33 PM, Allen Wirfs-Brock
> <allen at wirfs-brock.com <mailto:allen at wirfs-brock.com>> wrote:
> > foo.bar?(args) <==> foo.bar?.call(foo, args)
> > fun?(args) <==> fun?.call(undefined, args)
> How are these equivalent? Won't fun?.call evaluate to undefined
> if fun is undefined and undefined(undefined,args) will throw...
> ... check out the compilation:
> It doesn't eagerly evaluate to undefined ... the value of the *entire*
> expression is undefined if the chain is broken at the existential
> operator. That's much of the point of soaks:
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss