I'd rather have readable code with corner-case bugs, than completely bug free code no one can read. That's probably hard for some people to swallow, but there it is.
That said... I still think async-await is a minefield of bugs and footguns that has the *illusion* of simplicity, when in fact it's sometimes nearly as complicated as any RxJS nightmare blob.
I think twitter ate the first tweet in this thread... but basically:

I *love* Observable as a type and think people should use it more.

I'm *luke-warm* on RxJS operator chains. While they often provide safer, memory-leak/bug free code, commonly it's way less readable for folks.
Can you build literally anything with Observables? Yes. The end. You can. I don't care what anyone says. You can build it with Observables.

Should you? No. Probably not.

combineLatest(of(1), of(1)).pipe(map(([a,b]) => a + b)).subscribe(() => console.log('stop it 1 + 1 = 2'));
Observable excels at two things:

1. Memory/resource management
2. Eventing

Operators excel at composing observables. Therefor they excel at composing memory/resource management and composing events.
Observable sucks at *only one thing*: Guaranteeing a single value, and no more/less. That is what promise is for. (Promise sucks at everything else, though. haha).

Operators suck at: Readability. That may hurt coming from me, but there it is.
You can follow @BenLesh.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: