Open molpopgen opened 6 years ago
Side effects include:
Undoing tuple-based constructors introduced in #59 and #62. That's fine, as these changes can be viewed as a feature-creep caused by stuff I wanted in fwdpy11, but that can be done there via a different mechanism.
Assignment of the neutral
field would have to be handled differently, as we could no longer rely on dispatch to the base class. Again, easy enough.
The popgenmut
size would shrink by 8 bytes, which is cool!
The design of the changes being introduced in #95 may no longer be desirable. Rather, it would be preferable to model those concepts over what was done in #90, and use ADL instead of member functions.
Useful to note that doing this would pre-adapt the library for C++20's "concepts".
The current inheritance hierarchies for these types were originally developed so that fwdpp could use static_assert to enforce concepts via std::is_base_of.
Given that the library does not (easily) support population w/multiple mutation types at run time (although the current pop types do indeed allow for that), inheritance hierarchies should be removed and the library should rely on compile-time "duck typing" based on a minimal set of requirements to define a mutation.
The same arguments apply to the concept of "gamete".