On 26 August 2011 04:43, RobG <[email protected]> wrote:
>
>
> On Aug 23, 11:06 pm, Nick Morgan <[email protected]> wrote:
> [...]
>> The function declaration `createUniqueId` is effectively hoisted to
>> the top of the script, so it actually *is* defined before you add the
>> `counter` property to it.

> Not a big fan of that expression (hoisted). It might be what seems to
> be happening but what actually happens is that variable and function
> declarations (among other things) are processed first when an
> execution context is entered and before any code is executed.
>

Even Brendan Eich uses the term 'hoisting'. It might not be in any
spec, but it's used consistently in discussions of function
pre-processing.

> A better term (IMHO of course) would be "pre-processed", because not
> only does it infer that those parts of the code are processed before
> any other, but also actually describes what's happening. Hoisting
> makes me think of flags, which is unrelated and inconsistent.
>
> --
> Rob
>
> --
> To view archived discussions from the original JSMentors Mailman list: 
> http://www.mail-archive.com/[email protected]/
>
> To search via a non-Google archive, visit here: 
> http://www.mail-archive.com/[email protected]/
>
> To unsubscribe from this group, send email to
> [email protected]
>



-- 
Nick Morgan
http://skilldrick.co.uk
@skilldrick

Save our in-boxes! http://emailcharter.org

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to