Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Breaking up a big module

by hdb (Monsignor)
on Apr 25, 2019 at 13:36 UTC ( #1232984=note: print w/replies, xml ) Need Help??


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

This is probably where all the C++ books explain the difference between "is a" and "uses"...

Replies are listed 'Best First'.
Re^4: Breaking up a big module
by LanX (Archbishop) on Apr 25, 2019 at 13:41 UTC
    since I'm not a C++ programmer you might need to explain further.

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

      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.

        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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1232984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (1)
As of 2019-08-21 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?