Sure I could have phrased it better :-) I guess my point is having a
function assigned to a property or variable makes the syntax
consistent with other objects assignments. Contrast with Java, for
example, where a function is a second class object and cannot be
freely assigned - in that case an FD seems more appropriate syntax


> 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]

Reply via email to