Closed molpopgen closed 6 years ago
The proposed changes in #100 suggest that infsites
should be a generic wrapper enabling some type erasure. To avoid the use of std::bind
, we should provide a bind_infsites
template function returning a lambda.
Types like
KTfwd::infsites
(fwdpp/sugar/infsites.hpp
) andKTfwd::discrete_mut_model
(fwdpp/extensions/regions.hpp
) are not easily extensible. The current API relies too much on SFINAE ideas and also has too much code repetition (discrete_mut_model
replicates a lot of code ininfsites
, for example).It would be preferable if mutation types had static member functions returning new objects. Implementing this would enforce API standards for new types and provided avenues for code reuse and better extensibility.