Re: Meyer(s) gets it wrong
From: Programmer Dude (Chris_at_Sonnack.com)
Date: 02/20/04
- Next message: Programmer Dude: "Re: In tears"
- Previous message: AngleWyrm: "Re: compiler test [C++]"
- In reply to: Ian Woods: "Re: Meyer(s) gets it wrong"
- Next in thread: Joe \: "Re: Meyer(s) gets it wrong"
- Reply: Joe \: "Re: Meyer(s) gets it wrong"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 20 Feb 2004 11:07:08 -0600
Ian Woods wrote:
>> And to monkey wrench my own sense, how about a webserver getting
>> a request for "GET /". Same client, same command, different
>> results.
>
> And, just as importantly, different underlying behaviour. Some
> requests to some servers might involve merely fetching a file,
> or running a CGI/ASP/PHP/<insert TLA here> script.
Yep. But,.... [grin] been thinking about this, and I've decided
(in part to continue as Devil's Advocate, but also in because I
just don't see the OOP sense of polymorphism here) I just don't
see the OOP sense of polymorphism here.
(I'll go into why in detail in my response to Michael.)
>>> So, inheritence:
>>
>> Nah,... now this one I ain't buyin' at all.
>
> I think we might be back on a similar track to an earlier
> discussion we've had, to do with the difference between
> inheriting the underlying implementation of something as
> opposed to the interface of something. :)
Very possibly. I'd like to make clear that, first, in a GENERAL
sense of "polymorphic" (many shapes) and "inherited", I quite
agree with you guys' perceptions. It's the OOP-ish sense of
those concepts I don't feel quite applies. My goal here isn't
to convince anyone of the "truth" of my view--I just think it
might be fun to expose and dicuss the opposing viewpoints. And
hopefully, no one has any emotional attachments here! (-:
Anyway....
> My take on this from the view that OO is 'all about' the interface
> rather than the implementation.
This *is* going to get interesting, because a big part of my reply
to Michael involves the difference between interface ("shape") and
implementation!
> If I take a class A and derive a class B from it, I can specify
> which methods from A are applicable in B and provide additional
> methods of B's very own.
"Specialization". You're making a "more specialized" A.
> From here, other than the quirk that the inherited methods in B's
> interface happen to be duplicates of the behaviour of the same
> method in A (unless told otherwise), all that has been specified
> is how the interface of B relates to the interface of A.
But... without the implementation, all you have is a design, so I'm
not sure we can entirely discount it in defining "inheritance".
I'd quibble over calling the duplication a quirk--it's the whole
point. You can pass a B to something expecting an A, and that
something will "see" it as an A. And it will be, in fact, an A.
After all, inheritance is sometimes named "is-a". I might casually
say I "inherited" a behavior from a friend, but I wouldn't mean it
in the OOP-ish sense, because there's no "is-a" relationship. There
is more a "using", "supports" or "has-a" relationship.
-- |_ CJSonnack <Chris@Sonnack.com> _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________|
- Next message: Programmer Dude: "Re: In tears"
- Previous message: AngleWyrm: "Re: compiler test [C++]"
- In reply to: Ian Woods: "Re: Meyer(s) gets it wrong"
- Next in thread: Joe \: "Re: Meyer(s) gets it wrong"
- Reply: Joe \: "Re: Meyer(s) gets it wrong"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|