Subjects and top-down reactive programming
Composing Observable
objects is similar to composing functions, collections, or futures. Complex Observable
objects are formed from simpler parts using functional composition. This is a very Scala-idiomatic pattern, and it results in concise and understandable programs.
A not-so-obvious downside of functional composition is that it favors the bottom-up programming style. An Observable
object cannot be created without a reference to another Observable
object that it depends on. For instance, we cannot create an Observable
object using the map
combinator without having an input Observable
object to call the map
method on. In a bottom-up programming style, we build complex programs by implementing the simplest ...
Get Learning Concurrent Programming in Scala - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.