callback-hell
callback-hell copied to clipboard
Won't you lose the convenience of lexical scoping when creating first-class functions?
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 [email protected]:
— Reply to this email directly or view it on GitHubhttps://github.com/maxogden/callback-hell/issues/15 .
Thanks for the comment. I've heard the same elsewhere... it depends!