
Fun with Promises in JavaScript - curryhoward
https://www.stephanboyer.com/post/107/fun-with-promises-in-javascript
======
ryandvm
So, that's 4 function declarations to write a simple wait timer. How is that
Javascript saves us from the verbosity of Java again?

~~~
davelnewton
I know you realize it's an example and as an example it probably isn't the
best. I also have to assume you know that promisified code is almost always a
better approach than nesting, particularly deep nesting. So I'm missing your
point.

~~~
ryandvm
Heh. My point wasn't that promises are worse than callback hell - they aren't.

I was just making an irrelevant grumpy-old-man gripe about how much
boilerplate JavaScript has for a language whose proponents spent so much
energy decrying Java for boilerplate.

Don't worry, I fully appreciate the down-votes I get when I do that shit.

~~~
davelnewton
I don't generally see people switching to JS for less boilerplate than Java,
but for other reasons. That said, there's a lot less boilerplate than Java,
even with this. Plus promisification is usually a one-liner once you're using
a module or define the function.

I do grumpy-old-man stuff all the time too, although I'm getting better ;)

