It's so hard to keep up with the speeding modern programming concepts/frameworks train.  If only I had a bigger brain...

^ This here is a neat introduction to Reactive programming in Javascript.  I'd read a bit about Rx before, and am relatively familiar with basic functional programming concepts so it wasn't completely new to me, although the one statement that stuck out to me was about how Observables and Iterators are new data structures that have only gained prominence in the last few years.  I find the distinction important as a very simplified reason to jump on the Rx bandwagon.

At this point, you've maybe realized that

  • Optional<Thing> is better than checking for null,
  • Promise.then/catch is better than infinite callback chains,
  • and functional-style collection methods, e.g. .map, .foreach, .filter, etc., are better than manually looping through and having to manage your own result object or mutating the original object.  (Hush, monad-ites.  You'll just overwhelm my brain if you bring it up now)

Once you're familiar with using Optional and Promise, it's easy to see why working with multiple objects like this might be best with functional collection methods.

Likewise, I'm starting to see why Rx Observables are a natural way to work with multiple collections.  Their true benefit is to simplify asynchronous events (read "streams") to resemble collections so I can wrap my feeble mind around them.

© 2019. All Rights Reserved.