@Diego Perini: Right, yeah, duh... I get it, me being thick (again)... variable instantiation (declaration) versus code execution (assignment).
On Feb 9, 8:06 am, Juriy Zaytsev <[email protected]> wrote: > On Wed, Feb 9, 2011 at 1:44 AM, Angus Croll <[email protected]> wrote: > > Very nice article Dmitry. I share your philosophy of " more important > > to understand the mechanics than judge it good or bad" > > > Side note about FEs. I normally prefer over FDs, partly because they > > make top down reading more intuitive but mainly, I think, because they > > illustrate that in JavaScript functions are first class objects > > Not sure I would chose FE's due to them illustrating first-class'ness of > functions in Javascript :) > > However, one of the pro arguments is that FE's make refactoring easier, > since you don't need to care about accidentally moving FD into a block. At > the same time, with FE's you also likely lose identifier (not many people > use NFE's nowadays). > > I've seen a pattern where FD's were written after all other statements in a > scope. Replacing them with FE's obviously wouldn't be identical. > > I usually stick to FD by default, unless FE is necessary (like branching > assignment based on a feature test). > > [...] > > -- > kangax -- 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]
