On Thu, Nov 11, 2010 at 5:37 PM, Garrett Smith wrote:
> On 11/11/10, Michael Day wrote:
> > Hi Brendan and Allen,
> >
> > Thanks for the pointers.
> >
> >> So for Harmony, we are reclaiming function in block (must be a direct
> >> child of a braced block) to bind a block-local name on block entry
On 11/11/10, Michael Day wrote:
> Hi Brendan and Allen,
>
> Thanks for the pointers.
>
>> So for Harmony, we are reclaiming function in block (must be a direct
>> child of a braced block) to bind a block-local name on block entry (so
>> hoisting lives, but only to top of block -- so you can't emul
mike...@yeslogic.com]
> > Sent: Thursday, November 11, 2010 4:48 PM
> > To: Brendan Eich
> > Cc: ES-Discuss; Allen Wirfs-Brock
> > Subject: Re: Function declarations as statements
> >
> > Hi Brendan and Allen,
> >
> > Thanks for the pointers.
> >
Michael Day [mailto:mike...@yeslogic.com]
> Sent: Thursday, November 11, 2010 4:48 PM
> To: Brendan Eich
> Cc: ES-Discuss; Allen Wirfs-Brock
> Subject: Re: Function declarations as statements
>
> Hi Brendan and Allen,
>
> Thanks for the pointers.
>
> > So for Harmony, we
Hi Brendan and Allen,
Thanks for the pointers.
So for Harmony, we are reclaiming function in block (must be a direct child of
a braced block) to bind a block-local name on block entry (so hoisting lives,
but only to top of block -- so you can't emulate with var f = function ...).
If we impl
han trivial usage is unlike to be interoperable.
Allen
> -Original Message-
> From: es-discuss-boun...@mozilla.org [mailto:es-discuss-
> boun...@mozilla.org] On Behalf Of Michael Day
> Sent: Thursday, November 11, 2010 3:46 PM
> To: ES-Discuss
> Subject: Function decla
sted
> inside a block.
>
> However, browsers support function declarations as statements, and many
> scripts on the web seem to make use of this ability, especially after they
> have been minified.
>
> Is there a spec anywhere for how functions as statements should behave?
&
Hi,
In ECMAScript, function declarations are SourceElements, but not
Statements. This means that they can only occur at the top level, and
may not be nested inside a block.
However, browsers support function declarations as statements, and many
scripts on the web seem to make use of this
8 matches
Mail list logo