Callback Hell (2016)
callbackhell.com
Callback Hell (2016)
1–10 of 170 posts
Re: Callback Hell (2016)
#2Why not just write an article on medium?
Re: Callback Hell (2016)
#3Re: Callback Hell (2016)
#4Last updated in 2012. A lot has changed since.
Re: Callback Hell (2016)
#5Last updated in 2012. A lot has changed since.
Could you elaborate? Coming from Lua I always found the nesting of anonymous functions messy and wondered why they weren't done as in the article.
Simply put: A promise resolves to a single value asynchronously, an observable resolves to (or emits) multiple values asynchronously (over time).
Taken from here: http://stackoverflow.com/questions/36064303/what-are-the-dif...
Re: Callback Hell (2016)
#6A lot of beginner guides to various programming languages make this mistake of associating a certain property with a language as if it's inherent. In this case, async code - while sold as a main feature of the NodeJS platform - is in no way exclusive to, or even an inherent part of, Javascript/ES the language.
This may seem a nitpick, but I think it's an incredibly important distinction for beginners (or at least, I think it's incredibly important not to mislead beginners into believing in this limitation early on).
Another common example was, up until recently, that Javascript "wasn't powerful enough" to do filesystem access, hardware operations, etc. A simple side-effect of the environment the language was most commonly executing in (the browser) was turned into an inherent limitation of the language in order to "simplify things for beginners".
While bombarding beginners with a lot of info at the start is a bad idea, these kind of misconceptions can be very damaging. They leads to a very narrow idea of what's possible with (any) languages in general, and uninformed decisions on what to learn as a result.
Re: Callback Hell (2016)
#7Re: Callback Hell (2016)
#8Re: Callback Hell (2016)
#9As a curious and perhaps naive aside, I've been wondering why the programmer should need to care about asynchronous execution of code at all. Can't it all be abstracted under a procedural layer and let the OS worry about not blocking anything? The advent of promises, async.js, and other paradigms tell me that people still kind of want to write code that does one thing after another, then another, then another.
Re: Callback Hell (2016)
#10As a curious and perhaps naive aside, I've been wondering why the programmer should need to care about asynchronous execution of code at all. Can't it all be abstracted under a procedural layer and let the OS worry about not blocking anything? The advent of promises, async.js, and other paradigms tell me that people still kind of want to write code that does one thing after another, then another, then another.
For the most part - yes. And not because they want it but because there is no other way. You usually need to do something before you do that next thing anyway.