3 ms·
Funny timing! I've been using CasperJS all weekend and came across this same example snippet in CoffeeScript. I went ahead and did it in JavaScript and yep, l
by ericclemmons 14y ago
Funny timing! I've been using CasperJS all weekend and came across this same example snippet in CoffeeScript.
I went ahead and did it in JavaScript and yep, like the author accurately points out, it's messier.
The example snippet is has way too much outright nesting for my tastes.
At the end of it, I ended up using a couple modules to handle the codeless function wrappers and used function references instead of anonymous functions.
That seems clearer to me in either syntax than function inception.
- chii 14y agoI think the nesting is more a symptom of too much coupling. Coffeescript makes the nesting _look_ nicer, but i dont think it solves anything really.