Functional Reactive Programming in C++
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.Armstrong, J.: Making reliable distributed systems in the presence of software errors (2003)Google Scholar
- 3.Butenhof, D.: Recursive mutexes (2005)Google Scholar
- 4.Carmack, J.: In-depth: functional programming in C++ (2012)Google Scholar
- 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.Claessen, K.: Functional pearls: a poor man’s concurrency monad (1999)Google Scholar
- 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
- 10.Kohlhoff, C.: Boost.asio, 48(0), 2003–2013 (2003). http://www.boost.org/doc/libs/
- 12.Maier, I., Rompf, T., Odersky, M.: Deprecating the observer pattern. Technical report (2010)Google Scholar
- 14.Steele, G.L., Sussman, G.J.: Lambda: the ultimate imperative. Technical report (1976)Google Scholar
- 15.Wan, Z., Hudak, P.: Functional reactive programming from first principles. In: ACM SIGPLAN Notices, vol. 35, pp. 242–252. ACM (2000)Google Scholar