O'Reilly logo

Learning Concurrent Programming in Scala by Aleksandar Prokopec

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 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 map on. In a bottom-up programming style, we build complex programs by implementing the simplest parts first, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required