Integration of a decentralised pattern matching is a technique that enables a recent solution to the Expression Problem. The single former implementation of this technique was in Scala. In this paper, we highlight the C++ implementation of the same technique to solve the Expression Problem in C++. Unlike the former implementation which relies on stackability of Scala traits, this new implementation relies on compile-time metaprogramming for automatic iterative pointer introspection at runtime. That iteration enables late binding using overload resolution, which the compiler is already capable of. The C++ implementation outperforms the Scala one by providing strong static type safety and offering considerably easier usage.
Haeri, S. H., & Keir, P. (2019). Instructed late binding. Proceedings of the 23rd Pan-Hellenic Conference on Informatics. Published. PCI ’19: 23rd Pan-Hellenic Conference on Informatics, Nicosia Cyprus. https://doi.org/10.1145/3368640.3368644