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

Isaac Gouy igouy2@yahoo.com
Wed, 20 Oct 2004 16:47:55 -0700 (PDT)


--- Aaron Denney <wnoise@ofb.net> wrote:
> >> Saying "the objects should support: interfaces, messaging,
> >> mutation, and single inheritance" would make me a bit happier.

> > What happened to object identity?
> Honestly?  I'm never sure what's meant by it.  Any definition that I
> hear seems more like an implementation detail than semantics.

One object can always be distinguished from another.
Is that sufficiently free of implementation detail? :-)


> > Not sure what is meant by "interfaces" in this case
> Not truly needed for OO,

As-you-say not needed for OO.
Unless you were to say encapsulation...


> Actually even single inheritance throws out some pretty standard
> prototype based languages that I'd think you'd want to include.

As-you-say single inheritance isn't a distinguishing feature.
Subtype polymorphism is.

 
> >> Compare with arrays, where it is commonly understood to be an
> >> optimized map from a continuous subset (usually [0,n[) of the
> >> integers to one arbitrary type.
> > That would only be true of statically checked languages.
> 
> Nope.  For dynamic ones it's to the type "object".

Nice try - for dynamic ones it's to a subtype of the type object.

 
> I thought the idea of the shootout was "how easy (LOC), and how
> performant (CPU & MEM) is it to use these techniques in these
> languages".  OO style is a technique and different levels of language
> support make it easier or harder.

Seems like the tests are intended for OO languages.
Moreove it seems the tests are intended for class-based OO languages.

"each program should be implemented in the same way"
"the speed of method calls in OO languages"
"method calls of a base and a derived class on an object of the derived
class"


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

What I'm saying is that it's easier to write a one-off fast solution
when you don't have to make tradeoffs between the performance of
different OO language features.

C# has structs and it has objects - so we could choose to implement the
object creation test using structs, and the method call test using
functions. How silly.


		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com