[Shootout-list] Re: OO (was Re: process creation & message passing)
Brent Fulgham
bfulg@pacbell.net
Wed, 20 Oct 2004 13:20:17 -0700 (PDT)
[[[ OO Test Criteria ]]]
The test is supposed to determine the "cost" of doing
typical object-oriented tasks in a given language.
Requirements: An object hierarchy that allows for
polymorphic method dispatch (message passing) and
internal state. I'm not sure if anything else is
truly necessary.
Interfaces are an aspect of the object hierarchy, and
can be implemented as abstract base classes (as in
C++) or perhaps through a meta-object protocol.
I don't agree that we should exclude any languages
from
this test category. If someone wants to roll their
own object system in C that's fine -- it just needs
to be incorporated into the LOC metric.
We should allow Smalltalk, Python, Java, C++ (of
course), but also Lisp with CLOS, Scheme with GOOP or
TinyCLOS, Prolog with LogTalk, etc.
If people are able to implement the test in C using
arrays and function pointers, that should be fine. If
we feel the test is not requiring a true "Object
Oriented" implementation to solve it, then we should
adjust the test design.
> OO style is a technique and different levels of
> language support make it easier or harder.
Exactly.
> What we don't want is any implementation of the test
> to drift too far away from this OO style. One easy
> way is to exclude any non-OO language. I don't like
> it because that's saying "You can't do OO in this
> language" rather than "it's extremely hard to do OO
> in this language".
Right. The fact that for years Objective C and C++
compilers compiled to C code should be a good
indicator that there is nothing "magic" about the
technique.
-Brent