News for hackers. Stuff that matters.
Re:Early exit is a tail call optimization of procedural lang... by conceit on Monday December 14, 2015 @05:02PM (#10734280)
the term callback hell comes to mind, although I'm not sure that's the entire problem you quoted
Re:Early exit is a tail call optimization of procedural lang... by SideburnsOfDoom on Tuesday December 15, 2015 @04:13AM (#10736708)
I wasn't talking about callback hell (1) but if you want to do so - the point is that if the "nested callbacks" style is objectively worse (and this seems likely) then this can actually be measured.

Lines of code and cyclomatic complexity (2) is just the start.

You would have to do something like ... e.g. take a group people skilled in some other programming language, give them a basic grounding in Javascript, and have them work with some JS code samples with and without nested callbacks.

If there is clear difference in code comprehension, time to modify the code, lines of new code to accomplish a goal, and resulting bug count then you can have an informed opinion on if this code style is really objectively so bad.

That seems like a costly and time-consuming procedure. But if some academic institution did this I'd be pleased - some scarce data and some actual science is IMHO is worth a thousand opinions in this kind of recurring stylistic debate.

1) http://callbackhell.com/

2) https://en.wikipedia.org/wiki/Cyclomatic_complexity