Re: Proposal to fix super and new inconsistency, future-proofing broader uses of new operator

2013-12-10 Thread Herby Vojčík
[ reposting, since there was no reply to original posting ] [ thread starting here: https://mail.mozilla.org/pipermail/es-discuss/2013-August/033089.html ] Allen Wirfs-Brock wrote: An interesting proposal, but I'm not yet sold. Here are some of the issue I see: 1) By newing a function an

Re: Proposal to fix super and new inconsistency, future-proofing broader uses of new operator

2013-09-04 Thread Herby Vojčík
Allen Wirfs-Brock wrote: An interesting proposal, but I'm not yet sold. Here are some of the issue I see: 1) By newing a function an ES programmer is expressing a clear intent to use the body the body of the function as part of the instantiation process. It would be counter intuitive to not

Re: Proposal to fix super and new inconsistency, future-proofing broader uses of new operator

2013-09-03 Thread Allen Wirfs-Brock
An interesting proposal, but I'm not yet sold. Here are some of the issue I see: 1) By newing a function an ES programmer is expressing a clear intent to use the body the body of the function as part of the instantiation process. It would be counter intuitive to not execute the body of a

Proposal to fix super and new inconsistency, future-proofing broader uses of new operator

2013-08-31 Thread Herby Vojčík
Hello! PROBLEM In the present state of the spec, there is little inconsistency between behaviour of new and super. What these operation roughly do is: new Foo(...args) is Foo.call(Foo[@@create](), ...args) super(...args) inside constructor is