Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[es6-super-construct] Make 'super()' an early error in ordinary functions #20
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
wycats
Jan 9, 2015
Contributor
I think I remember Microsoft being worried about too many early errors because they force more aggressive evaluation of function bodies? @bterlson ?
|
I think I remember Microsoft being worried about too many early errors because they force more aggressive evaluation of function bodies? @bterlson ? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
allenwb
Jan 9, 2015
Member
On Jan 9, 2015, at 9:42 AM, Yehuda Katz wrote:
I think I remember Microsoft being worried about too many early errors because they force more aggressive evaluation of function bodies? @bterlson ?
No, its more extensive analysis of function bodies prior to first evaluation of anything in a script because a script with early errors must not execute any code.
However, this one additional early error, given the early errors we already have seems unlike to make much difference.
|
On Jan 9, 2015, at 9:42 AM, Yehuda Katz wrote:
However, this one additional early error, given the early errors we already have seems unlike to make much difference. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
ES6 is done, doing some housecleaning! |
dslomov commentedJan 8, 2015
Per es6-super-construct proposal, 'super()' invocation in ordinary functions always throws:
We have a precedent already for concise methods where an occurrence of 'super()' call (DirectSuper) is an early error.
It will greatly help language usability if the same applies to ordinary functions (implementations can provide better error messages; the bugs are sure to be discovered)