its a tradeoff, relying too heavily on lexical scoping makes things harder
to understand and harder to modularize (you cant share lexical scope
between modules). a nice side effect of decoupled functions is the explicit
interface and lack of magical-seeming shared variables
sometimes its nice to put a function inside another function to take
advantage of the lexical scope convenience, but I personally go more than 1
level deep
On Mon, Aug 19, 2013 at 1:33 PM, Anthony Mastrean
notifications@github.comwrote:
—
Reply to this email directly or view it on GitHubhttps://github.com/maxogden/callback-hell/issues/15
.
its a tradeoff, relying too heavily on lexical scoping makes things harder to understand and harder to modularize (you cant share lexical scope between modules). a nice side effect of decoupled functions is the explicit interface and lack of magical-seeming shared variables
sometimes its nice to put a function inside another function to take advantage of the lexical scope convenience, but I personally go more than 1 level deep
On Mon, Aug 19, 2013 at 1:33 PM, Anthony Mastrean notifications@github.comwrote: