Re:“Node.js is one of the worst things to happen to the soft...
by nurettin on Tuesday August 23, 2016 @01:16AM
(#12341559)
This is exactly what I was about to write. Also, the amount of "callbacks, that's how it's supposed to be" and "hardware is like that" and "programming is hard, deal with it" kind of replies for a readily solved problem are staggering.
[ Parent
| on HN ]
Re:“Node.js is one of the worst things to happen to the soft...
by lootsauce on Tuesday August 23, 2016 @01:43AM
(#12341656)
I don't know about others but the imposition of try catch for error handling in async/await seems to cut against the syntax gains over promises.
Re:“Node.js is one of the worst things to happen to the soft...
by nurettin on Tuesday August 23, 2016 @04:04AM
(#12342110)
If by promises you mean the `some.fun(had).catch(had, function(){handle stuff here})` syntax compared to async/await, that is actually a very fair point and it does make two syntaxes similarly verbose.
However, it is still easier to follow a ladder of conditional statements using async/await compared to escher-style stairs of callbacks inside callbacks.
Re:“Node.js is one of the worst things to happen to the soft...
by edwinjm on Tuesday August 23, 2016 @07:03AM
(#12342728)
Interesting. In which language is this "readily solved"?
Re:“Node.js is one of the worst things to happen to the soft...
by iends on Tuesday August 23, 2016 @07:33AM
(#12342836)
Erlang, Elixir, & Go have nicer models.