On Sat, Mar 22, 2008 at 06:17:07PM -0700, Darren New wrote:
David Brown wrote:
Mr. Brown, who spent many years implementing a fairly large OO system, in C
using structures filled with function pointers.

OK, so you're falling out of your chair because he said "virtual function" instead of "virtual function or function pointers". Right.

I wasn't the one falling out of the chair.  Perhaps the quote got
misattributed.

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.  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.

It doesn't have to be done with function pointers or vtables, though.  It
can be compute as lookups at runtime, or each method can generate condition
code as part of its implementation (most CLOS implementations, or GNU
Eiffel).

David

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to