A C++17 library implementing fast, open multi-methods to solve the Expression Problem, now superseded by Boost.OpenMethod.
YOMM2 is a C++17 library that implements fast, open multi-methods, allowing dynamic function dispatch based on the runtime types of multiple arguments. It solves the Expression Problem by enabling developers to add new data types and operations without modifying existing code. The library has been superseded by Boost.OpenMethod, an official Boost library with enhanced features.
C++ developers working on systems requiring extensible polymorphic behavior, such as compilers, interpreters, or domain-specific languages where the Expression Problem is a concern.
Developers choose YOMM2 (and its successor Boost.OpenMethod) for its efficient, orthogonal multi-method implementation that integrates seamlessly with modern C++, offering a clean solution to the Expression Problem without sacrificing performance.
Fast, orthogonal, open multi-methods. Solve the Expression Problem in C++17.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Optimized dispatch table generation ensures high-performance dynamic resolution for multiple arguments, as highlighted in the key features for efficiency.
Separates method definitions from class hierarchies, enabling modular addition of new types and operations without modifying existing code, directly addressing the Expression Problem.
Compliant with C++17 standards, leveraging type safety and metaprogramming for seamless integration with contemporary codebases.
Provides virtual_ptr for handling polymorphic arguments, simplifying multi-method usage with object hierarchies, as noted in the features.
YOMM2 has been discontinued in favor of Boost.OpenMethod, meaning no future updates, bug fixes, or official support, as stated in the README.
Porting to Boost.OpenMethod requires code changes, especially for advanced features like policies and facets, which the README admits may need extra work.
Relies on macros like declare_method and define_method, which can lead to cryptic error messages and reduced code clarity compared to modern C++ idioms.
Experimental optimizations such as compile-time dispatch tables were not carried over to the successor, limiting potential performance enhancements in certain scenarios.