4 ms·
Callback hell shouldn't exist. It just means you haven't abstracted out your logic properly.
by coenhyde 10y ago
Callback hell shouldn't exist. It just means you haven't abstracted out your logic properly.
- lossolo 10y agoSure, i fully agree in point that callback hell shouldn't exist but i didn't wrote that it exists in our code base, that's why i wrote about promises in my comment. But i still read callback hell in a lot of packages that were created before promises started to be popular. Even some of new packages that i saw are still written in pure callback way because authors prefer that old school way of doing things.
- abritinthebay 10y agoSeriously. When someone complains about callback hell its a good sign that their application is a poorly written mess. I see it a lot from backend developers who never really knew JS that well and then moved on to the next shiny thing (right now Go, but Haskell, Rust, etc) without ever having a good grasp of WHY they has issues - instead they blame node/JS. In a year or so I fully expect all these articles to switch to "why Go sucks" as the cycle repeats.
- goldbrick 10y agoI don't know what HN you read but on mine the "Go sucks" trend has fully started.
- abritinthebay 10y agoI'm seeing the beginnings of it, yeah. It'll take a while tho - still plenty of positive Go articles show up on the front page.
- senthil_rajasek 10y agoGood language abstractions should allow elegant logical abstractions in code without trapping a programmer in a nasty web.