Abstract
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Armstrong, J.: Making reliable distributed systems in the presence of software errors (2003)
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)
Butenhof, D.: Recursive mutexes (2005)
Carmack, J.: In-depth: functional programming in C++ (2012)
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)
Claessen, K.: Functional pearls: a poor man’s concurrency monad (1999)
Epstein, J., Black, A.P., Peyton-Jones, S.: Towards Haskell in the cloud. SIGPLAN Not. 46(12), 118–129 (2011)
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)
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). https://doi.org/10.1007/3-540-40048-6_13
Kohlhoff, C.: Boost.asio, 48(0), 2003–2013 (2003). http://www.boost.org/doc/libs/
Lee, E.A.: The problem with threads. Computer 39(5), 33–42 (2006)
Maier, I., Rompf, T., Odersky, M.: Deprecating the observer pattern. Technical report (2010)
Rodgers, D.P.: Improvements in multiprocessor system design. SIGARCH Comput. Archit. News 13(3), 225–231 (1985)
Steele, G.L., Sussman, G.J.: Lambda: the ultimate imperative. Technical report (1976)
Wan, Z., Hudak, P.: Functional reactive programming from first principles. In: ACM SIGPLAN Notices, vol. 35, pp. 242–252. ACM (2000)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Čukić, I. (2019). Functional Reactive Programming in C++. In: Zsók, V., Porkoláb, Z., Horváth, Z. (eds) Central European Functional Programming School. CEFP 2015. Lecture Notes in Computer Science(), vol 10094. Springer, Cham. https://doi.org/10.1007/978-3-030-28346-9_2
Download citation
DOI: https://doi.org/10.1007/978-3-030-28346-9_2
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-28345-2
Online ISBN: 978-3-030-28346-9
eBook Packages: Computer ScienceComputer Science (R0)