David Brown wrote:
I wasn't the one falling out of the chair. Perhaps the quote got
misattributed.
Sorry. I thought it was Mr Smith replying. Not used to folks referring
to themselves in third person.
It seemed clear to me the question was "is your program still OO
without dynamic dispatch?" Maybe you're more literal-minded than I am.
I would consider dynamic dispatch as an essential component as OO.
Right. I was saying it seemed obvious to me that by your reference to
"virtual functions in C++" you meant "dynamic dispatch", and I was
questioning why Mr Smith was incredulous.
I.e., summarizing,
You: "Do you consider C++ without virtual functions to be OO?"
Smith: "No, that's ridiculous. Alan Kay said..."
Me: "Alan Kay said dynamic dispatch is necessary."
Smith: "Virtual functions != dynamic dispatch."
Well, yes, obviously. But it seemed clear to me you were asking about
C++'s OO features minus dynamic dispatch, while the idea that there's
also function pointers wouldn't lead me to "fall out of the chair" kind
of surprise.
In
fact, it's probably the only one that's really essential. When I do OO in
a "non-OO" language, when I end up doing is generally tables of function
pointers.
I found it interesting that Alan Kay's original definition of OO was
dynamic binding + garbage collection.
It took me a while to figure out why "garbage collection" was as
necessary as "dynamic dispatch", but without GC, you have to know the
internals of how the methods are implemented in order to know when it's
safe to "free" the objects you passed as arguments.
Later quotes by Kay differ from what he says in Smalltalk-80 books, tho.
--
Darren New / San Diego, CA, USA (PST)
"That's pretty. Where's that?"
"It's the Age of Channelwood."
"We should go there on vacation some time."
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg