attribute or subclass

From: Gergely Buday (greg_at_no-spam.xhvg.hu)
Date: 04/22/04


Date: Thu, 22 Apr 2004 14:03:06 +0200

I have a class and I would like to have another class that somehow contains
the original one. There are two ways to achieve this:

- to have the original class as an attribute of the new class

- to derive the new class as the descendant of the original one

Which are the pros and cons of these methods?

- Gergely



Relevant Pages

  • Re: the big lie
    ... think that accurate records should somehow be kept on the "pros". ... Read & post to RGP at MyWayPoker.com ...
    (rec.gambling.poker)
  • Re: Speed up simple function - call C-Code
    ... Since I am running this function so many times, I somehow need to speed up ... since despite the fact that each iteration is ... of cons and h) would speed up the process. ... Rather than performing the computation hundreds of thousands of times on ...
    (comp.soft-sys.matlab)
  • Speed up simple function - call C-Code
    ... Since I am running this function so many times, I somehow need to speed up the process, since despite the fact that each iteration is ... Do you think that calling a C-function (in which I would feed my 5-D matrix of cons and h) would speed up the process. ...
    (comp.soft-sys.matlab)
  • Re: Speed up simple function - call C-Code
    ... Since I am running this function so many times, I somehow need to speed up the process, since despite the fact that each iteration is ... Do you think that calling a C-function (in which I would feed my 5-D matrix of cons and h) would speed up the process. ...
    (comp.soft-sys.matlab)
  • Re: Roger Federer now 3rd on my GOAT list and will go to #1 if he wins USO and YEC this year
    ... somehow i was afraid of that;o) ... i think enough pros, including pete, recognise ... please recommend one "yes" album for me. ...
    (rec.sport.tennis)