David Ells wrote:
> Carl Banks wrote:
> > The classical advice in choosing whether to subclass or or use
> > attribute is whether its more an an "is a" or "has a" relationship. If
> > it's more natural to say B is an A, then subclass. If it's more
> > natural to say B has an A, then use an attr
Carl Banks wrote:
>
> I think it's kind of a fine point. In my own code I've had cases where
> I've switched from subclass to attribute and back over the development,
> and vice versa. I think there are many cases where it's preferable to
> use an attribute, but not really wrong to subclass (and
Chaz Ginger wrote:
> I was writing some code that used someone else class as a subclass. He
> wrote me to tell me that using his class as a subclass was incorrect. I
> am wondering under what conditions, if ever, does a class using a
> subclass not work.
>
> Here is an example. For instance the ori
At Thursday 24/8/2006 19:51, Chaz Ginger wrote:
>> I was writing some code that used someone else class as a subclass. He
>> wrote me to tell me that using his class as a subclass was incorrect. I
>> am wondering under what conditions, if ever, does a class using a
>> subclass not work.
>>
>> cl
Gabriel Genellina <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> At Thursday 24/8/2006 17:44, Chaz Ginger wrote:
>
>>That is merely a logical use of OO after all when would a car and an
>>orange be the same?
>
> Uh... what's the point...?
> By example, an orange inside a car would be mo
At Thursday 24/8/2006 17:44, Chaz Ginger wrote:
>> I was writing some code that used someone else class as a subclass. He
>> wrote me to tell me that using his class as a subclass was incorrect. I
>> am wondering under what conditions, if ever, does a class using a
>> subclass not work.
>>
>> cl
Gabriel Genellina wrote:
> At Thursday 24/8/2006 16:23, Chaz Ginger wrote:
>
>> I was writing some code that used someone else class as a subclass. He
>> wrote me to tell me that using his class as a subclass was incorrect. I
>> am wondering under what conditions, if ever, does a class using a
>>
Fredrik Lundh wrote:
> please don't hit reply to arbitrary messages when you're posting new
> messages; it messes up the message threading.
>
> Chaz Ginger wrote:
>
>> I was writing some code that used someone else class as a subclass. He
>> wrote me to tell me that using his class as a subclass
At Thursday 24/8/2006 16:23, Chaz Ginger wrote:
I was writing some code that used someone else class as a subclass. He
wrote me to tell me that using his class as a subclass was incorrect. I
am wondering under what conditions, if ever, does a class using a
subclass not work.
class B1(A);
def
Chaz Ginger wrote:
> I was writing some code that used someone else class as a subclass. He
> wrote me to tell me that using his class as a subclass was incorrect. I
> am wondering under what conditions, if ever, does a class using a
> subclass not work.
[snip]
> He said I should use it this way:
Chaz Ginger wrote:
> I was writing some code that used someone else class as a subclass. He
> wrote me to tell me that using his class as a subclass was incorrect. I
> am wondering under what conditions, if ever, does a class using a
> subclass not work.
>
> Here is an example. For instance the ori
please don't hit reply to arbitrary messages when you're posting new
messages; it messes up the message threading.
Chaz Ginger wrote:
> I was writing some code that used someone else class as a subclass. He
> wrote me to tell me that using his class as a subclass was incorrect. I
> am wondering
I was writing some code that used someone else class as a subclass. He
wrote me to tell me that using his class as a subclass was incorrect. I
am wondering under what conditions, if ever, does a class using a
subclass not work.
Here is an example. For instance the original class might look like
13 matches
Mail list logo