Alternative to Promise
y.s.inside at gmail.com
Thu Oct 1 05:57:01 UTC 2015
To be frankly, I can't read your doc in just 5min, it's a little obscure to
me. Please don't stick on performance or internal complexity, it's not the
bottleneck. The internal implementation of a library may be complex, but
that's not what the end users care, most people use one thing before full
understand how it works. In your opinion, does it means everyone should
full understand the kernel of the linux before using it? If everyone does
it, most of them will find some part of the linux is as bad as what you
think about promise. If they take time to reinvent every so called not good
enough part of it, they won't even have time to enjoy a movie, because the
world is full of little flaws.
You say your lib is much simpler than promise. Promises/A+ have only one
api: `then`, you have 4: `go`, `next`, `guard`, `freeze`. The purpose of
promise is let people work happily without knowing the internal state of
it, and it doesn't constrain the type of the error, and give users the
freedom. It's easy to see that you add more rules than promise. I can't say
your thoughts is bad or wrong, but what the points you say promise is bad
are just not good enough to persuade me.
And I predict that as you learn more you will find your Action is still as
bad as promise, it's may 10% better, but it's still a bad way to handle the
real async world. I've seen a lot of libs like yours, and I created
something alike when developing my own promise lib, we need a mind blow
idea, not a little better idea.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss