16:28 I think the “command pattern” is typically associated with objects that have one main/primary member-function (e.g. execute()). I think I might consider Sebastians example as “policy” (a-la policy based design) or strategy
@Roibarkan15 күн бұрын
19:36 [slide 33] I wonder what might be the value of inheriting from the template argument vs. storing an instance of the template argument as a member variable. Commonly inheritance implies the is-a relationship (Liskov substitution) which I don’t think is the case here
@terragame583615 күн бұрын
Private inheritance, I'd argue, may generally be seen as just a more convenient form of embedding the object as a field. The resulting subclass cannot be used as an instance of the base class, except internally by its own methods.
@Roibarkan15 күн бұрын
@@terragame5836 thanks. Apart from "tricks" like the empty-base-optimization - I don't see std::vector inheriting from its allocator, std::map inheriting from its comparator or std::views::filter_view inheriting from its base view. Maybe there are motivating examples I'm not aware of
@Voy237811 күн бұрын
@@Roibarkan filter_view inherits from a base class class filter_view : public ranges::view_interface or you meant something else ?
@Roibarkan15 күн бұрын
23:30 Sean Parent’s talk: kzbin.info/www/bejne/h3jGh4uderuAgMk