http://qs321.pair.com?node_id=1232987


in reply to Re^4: Breaking up a big module
in thread Breaking up a big module

The difference is that using methods from some other class (say car) by inheritance means that the class (say racing car) is a kind of that other class (a racing car is a car). While using means that a class (say racing car) is using methods from some other class (say engine) without being of that kind of the other class (a racing car has an engine but is not an engine). This argument is probably not C++ specific but that is where I remember it from.

Replies are listed 'Best First'.
Re^6: Breaking up a big module
by LanX (Saint) on Apr 25, 2019 at 13:54 UTC
    I think that's why mixins were invented, see also Moose/Manual/Roles

    AFAIK are Mixins/Roles basically sophisticated imports.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice