Subject: [boost] yomm2 - open methods
From: Jean-Louis Leroy (jl_at_[hidden])
Date: 2018-01-19 18:23:05
in 2013 I posted a proposal for an "open multi-methods" library, see
here: https://lists.boost.org/Archives/boost/2013/07/205383.php Due to
insufficient interest, I did not go forward with a formal submission,
and I published my work on github, under the name yomm11.
I have now completely rewritten the library. The new version - yomm2 -
is available here: https://github.com/jll63/yomm2 This iteration is
much better because it does not require any modifications to classes
involved in method dispatch, yet the speed of a method call with one
virtual argument is within 15% of the equivalent virtual function
Over the years I realized that the value of such a library resides
more in the 'open' than in the 'multi' aspect. Open methods are
virtual functions that live outside classes, like free functions. They
solve several problems, notably the Expression Problem
(http://wiki.c2.com/?ExpressionProblem) and Cross-Cutting Concerns
(http://wiki.c2.com/?CrossCuttingConcern). They provide an elegant
replacement for the Visitor pattern. yomm2 also implement multiple
dispatch, which can come (occasionally) handy.
Well I am just touching base to see if things have evolved and if
there might now be an interest in seeing this in Boost.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk