[Shootout-list] Re: OO (was Re: process creation & message passing)

Brent Fulgham bfulgham@debian.org
Wed, 20 Oct 2004 22:48:14 -0700


I wrote:
> > If people are able to implement the test in C using
> > arrays and function pointers, that should be fine.

On Wednesday 20 October 2004 10:09 pm, Brandon J. Van Every wrote:

> It is not fine.  There is no such widespread OO system for C.  The
> overwhelming majority of people do not use C this way.

The GTK toolkit uses exactly this model.  They wrote their own object
hierarchy in C.  I'm not saying *I* would do this, but if someone wants to
submit a solution that incorporatest their own object oriented core into
their test example, I have no serious issue with it.

> Are you really really really really into the idea of promoting
> the "potential OO-ness of C," or are you just being kinda theoretical
> and wonkish about testing inclusiveness?

Ummmm.  Wonkish.

I just don't take the view that a language must receive some kind of
legal writ stating that it is "heretofore and forevermore included in
the loving brotherhood of OO languages".  OO is a tool, and just like
the cargo cults in the south pacific crafted simulacra of aircraft out
of branches and bamboo, some enterprising C programmer might
decide to craft a partial object system out of structs and pointers.

Sure, an airplane made of bamboo and leaves will (probably) not fly, but it
served the particular purpose of it users.  Similarly, a partial object system
might be sufficient for the needs of a C programmer -- in this case, for the
shootout.

Isaac likes to poke fun at himself for crafting the Clean OO test example,
but I think it's valid to treat Type classes as a hierarchy in the same
way as an object system.  They are two ways of dealing with the
same problem.

> It is actually OK, IMHO, to 
> cut out spurious cases and get people to concentrate on big picture
> issues.  The marginal OO possibility of C is an itsy bitsy eeny weeny
> teeny tiny issue.

It's a moot point.  Someone already wrote such an entry.  It's here, and
it's going to stay.

That doesn't mean it has to appear on Isaac's nifty "Object Oriented Shootout"
page, but I'd like to retain an original "Shootout" view of our database that
would be all inclusive.

We can similarly make a "Least-Common-Denominator" page to meet
Brandon's goals.

-Brent