Function declarations in statements

Igor Bukanov igor at
Sat Mar 17 11:46:19 PDT 2007

On 17/03/07, Brendan Eich <brendan at> wrote:
> On Mar 17, 2007, at 4:41 AM, Igor Bukanov wrote:
> That's right -- var and function are not equivalent. You cannot
> rewrite function f() {} as var f = function (){}.

Hence the proposal: make function f() {} to be equivalent to
var f = function() {}; = "f" placed at the beginning of the
block. This still allows a conditional function definitions while
removing the discrepancy with vars.

Regards, Igor

More information about the Es4-discuss mailing list