Brendan Eich wrote:
Worse, instead of leaking an observable ConditionalReference (whew!),
you've opted to break the equivalence between foo.bar() and %tmp =
foo.bar; %tmp.call(foo) for the case where . is replaced by ?. -- in
this case your proposal does not throw while the expansion does.
The right extension for what CoffeeScript calls ?( is simply to use an
unambiguous and backward-compatible extension, such as ?.( instead.
Jeremy pointed out privately that the need for ?( is less acute in
practice, and also because of .call via the equivalences:
foo.bar?(args) <==> foo.bar?.call(foo, args)
fun?(args) <==> fun?.call(undefined, args)
But ?.( is shorter. It's awkward to use three chars instead of
CoffeeScript's two, and to have a dot in the middle where no get or set
is implied.
/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss