3 ms·
I never liked the event oriented async programs. They are just harder to debug. Once you have more that a handful of evented object with couple of possible even
by msoad 11y ago
I never liked the event oriented async programs. They are just harder to debug. Once you have more that a handful of evented object with couple of possible events you pretty much guaranteed to not know where to look for bugs.
Promises are not perfect either, but at least you can inspect them and thanks to new developer tools you can do it much easier.
- coke12 11y agoWhy not just write events to a log, and then use the log to reproduce your bug?
- lkrubner 11y agoIf the events involve I/O then they are not deterministic. Even if you save every event to Kafka and then replay them, you may not get the same bug.
- inglor 11y ago:( https://code.google.com/p/chromium/issues/detail?id=526811 https://code.google.com/p/chromium/issues/detail?id=526811
- munro 11y agoBluebird makes debugging easy with long stack traces [1], and unhandled rejection detection [2]. Without the unhandled rejection detection, it's easy to get burned by forgetting to handle a rejection case, or use `.done()`. [1] https://github.com/petkaantonov/bluebird/blob/master/API.md#promiselongstacktraces---void https://github.com/petkaantonov/bluebird/blob/master/API.md#... [2] https://github.com/petkaantonov/bluebird/blob/master/API.md#promiseonpossiblyunhandledrejectionfunction-handler---undefined https://github.com/petkaantonov/bluebird/blob/master/API.md#...
- inglor 11y agoAs a bluebird contributor it's worth pointing out that while our stack traces are pretty sweet - unhandled rejection tracking exists in most modern promise libraries.