the abstract base class interface(ABCI) via pure virtual functions is perhaps the 1st. (apart from the C style function pointer). it is analogues to
type, abstract in fortran, and dyn Trait in rust and ABC / Protocol in pythonsometimes due to performance considerations in compiled languages, one needs to switch to the compile time alternatives. in cpp the most common one is template(used with concept) which is close to
T: Trait in rust and interface in fortran.Do you think ABCI and template+concept are the 1st and 2nd best in cpp? what else?
https://redd.it/1s6ikn8
@r_cpp