Functional Reactive Programming in C++

  • Ivan ČukićEmail author
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10094)


Reactive programming is a relatively new discipline that teaches how to design and develop complex systems through the notion of data-flow. The main idea is that the system, and its components, are able to receive signals, and to react to them in some way. The signals can be seen as streams of messages that we can transform using the usual monadic functions (map, bind, filter, etc.) and that we can easily direct through our system.

Reactive programming removes the usual complexity of explicitly dealing with the shared mutable state, manual synchronization with mutexes, and alike.

We are presenting an approach for implementing reactive systems in the C++ programming language, by creating abstractions over the commonly used methods for achieving concurrency, like callbacks and signals and slots.


  1. 1.
    Armstrong, J.: Making reliable distributed systems in the presence of software errors (2003)Google Scholar
  2. 2.
    Bainomugisha, E., Carreton, A.L., van Cutsem, T., Mostinckx, S., de Meuter, W.: A survey on reactive programming. ACM Comput. Surv. 45(4), 52:1–52:34 (2013)CrossRefGoogle Scholar
  3. 3.
    Butenhof, D.: Recursive mutexes (2005)Google Scholar
  4. 4.
    Carmack, J.: In-depth: functional programming in C++ (2012)Google Scholar
  5. 5.
    Charousset, D., Hiesgen, R., Schmidt, T.C.: CAF-the C++ actor framework for scalable and resource-efficient applications. In: Proceedings of the 4th International Workshop on Programming based on Actors Agents and Decentralized Control, pp. 15–28. ACM (2014)Google Scholar
  6. 6.
    Claessen, K.: Functional pearls: a poor man’s concurrency monad (1999)Google Scholar
  7. 7.
    Epstein, J., Black, A.P., Peyton-Jones, S.: Towards Haskell in the cloud. SIGPLAN Not. 46(12), 118–129 (2011)CrossRefGoogle Scholar
  8. 8.
    Hewitt, C., Bishop, P., Steiger, R.: A universal modular actor formalism for artificial intelligence. In: Proceedings of the 3rd International Joint Conference on Artificial Intelligence, IJCAI 1973, pp. 235–245. Morgan Kaufmann Publishers Inc., San Francisco (1973)Google Scholar
  9. 9.
    Järvi, J.: C++ function object binders made easy. In: Czarnecki, K., Eisenecker, U.W. (eds.) GCSE 1999. LNCS, vol. 1799, pp. 165–177. Springer, Heidelberg (2000). Scholar
  10. 10.
    Kohlhoff, C.: Boost.asio, 48(0), 2003–2013 (2003).
  11. 11.
    Lee, E.A.: The problem with threads. Computer 39(5), 33–42 (2006)CrossRefGoogle Scholar
  12. 12.
    Maier, I., Rompf, T., Odersky, M.: Deprecating the observer pattern. Technical report (2010)Google Scholar
  13. 13.
    Rodgers, D.P.: Improvements in multiprocessor system design. SIGARCH Comput. Archit. News 13(3), 225–231 (1985)CrossRefGoogle Scholar
  14. 14.
    Steele, G.L., Sussman, G.J.: Lambda: the ultimate imperative. Technical report (1976)Google Scholar
  15. 15.
    Wan, Z., Hudak, P.: Functional reactive programming from first principles. In: ACM SIGPLAN Notices, vol. 35, pp. 242–252. ACM (2000)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Faculty of MathematicsUniversity of BelgradeBelgradeSerbia

Personalised recommendations