Proto operator for function declarations (was: Re: <| and function declarations)
Herby Vojčík
herby at mailbox.sk
Fri Jan 27 05:14:02 PST 2012
Hello,
in http://wiki.ecmascript.org/doku.php?id=harmony:proto_operator, these
two items appear in rationale:
- Setting the prototype of a function to something other than
Function.prototype
- Implementing class-like parallel constructor and instance prototype
inheritance chains.
These items can be very beneficial for function declarations, but for
the moment, the proposal only allows these for function expression:
var Foo = Super <| function (name) { ... };
Could the proposal be extended to allow also declarations, either as:
Super <|
function Foo (name) {
...
}
or, probably slightly better because declaration would begin with
'function', but harder to set up a grammar:
function Super <| Foo (name) {
...
}
?
Thanx, Herby
More information about the es-discuss
mailing list