Chapter 10. Battle of the paradigms

This chapter covers

  • One example (drag-and-drop) in three paradigms
  • Comparing the merits of classic static machine vs. FRP vs. actor model
  • Adding a feature to see how each approach copes

As you may have gathered, FRP is awesome. But for some tasks, the level of awesome is more limited, and other paradigms do a better job.

Drag-and-drop is a common task that fits FRP pretty well, but two other paradigms—classic state machine and the actor model—also do a nice job of it, for different reasons. We want you to understand why this is so you can make the right choices in your code.

10.1. Classic state machine vs. FRP vs. actor model

Figure 10.1 presents the same simple drag-and-drop example written in three ...

Get Functional Reactive Programming 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.