[Shootout-list] Re: OO (was Re: process creation & message passing)
Isaac Gouy
igouy2@yahoo.com
Thu, 21 Oct 2004 12:23:50 -0700 (PDT)
> --- Aaron Denney wrote:
> > My suggestion means you have multiple tests, each
> > requiring some aspect in the object-system that you
> > think is reasonably core. Requiring the same
> > object-system for all tests means that one can't
> > optimize the object system for case "a" in test "a",
>
> > case "b" in test "b", and so forth, but has to make
> > tradeoffs, just as languages with built-in
> > OO systems need to do.
>
> This is an excellent idea.
That would be why objinst and methcall are supposed to use the same
classes.
Shifting judgement onto the test is just going to make it more
difficult to write benchmark tests and more difficult to write programs
that meet them. (Now we have to write a test that will distinguish
between records/procedures and objects/methods etc).
> My goal is that implementations using something like
> Haskell or Clean typeclasses can be considered "valid"
> solutions.
"Haskell provides typeclass-based bounded polymorphism as opposed to
subtyping polymorphism of object-oriented languages such as OCaml and
Java. It is a contentious question whether Haskell (alone or with extra
extensions) can support conventional object-oriented programming with
encapsulation, inheritance, overriding, statically checked subtyping
and so on."
When it stops being contentious, and when this short paper is expanded
so that you guys can write Haskell programs with subtypes ... we won't
need to pretend that typeclasses are the same as subtyping.
http://homepages.cwi.nl/~ralf/OOHaskell/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com