[Haskell-cafe] Haskell's overlooked object system: was OO idioms redux

Ben.Yu at combined.com Ben.Yu at combined.com
Wed Oct 13 19:26:48 EDT 2004

>Why do you (or do these people) think having all the OO idioms of OCaml
>(see OCamls OO tutorial) is useless? Or do you mean too baroque? If not,
>what's missing?

Because it does not give us much that we cannot do nicely with the current
functional part.
separate name space of course. But it does not seem obvious that the rest
of the object piece is necessary.
Anything missing? Can't think of one. Simplicity I guess.

>implementation inheritance, the strange "#" syntax, virtual method, why do
>I need them?
>Fine with me.
>OOHaskell doesn't need them, indeed.


>Well having no implementation inheritance in Java would be a pretty
>brave limitation.
>Anyhow, OOHaskell (and OCaml) has programming-against-interface as well.

It may be.
But is it a brave limitation that Haskell does not have implementation
I don't see the absolute need for impl-inheritance in an already rich and
integral language such as Haskell.
If impl-inheritance is already an arguable feature in OO langauges, I guess
more thought should be given before it is pushed into a functional language
at the cost of language complexity. (All I'm saying is general concern, it
does not refer to HList or OOHaskell because I have no knowledge about

>Have you seen HList?
>There are 4 different solutions for first-class labels in the

No. I'm just throwing in some ideas. If it is irrelavant or something
already done, my apology. :)
But, hey, don't get me wrong. I have no problem to see the language
supporting impl-inheritance and other OO features. What I'm against is to
invent a whole new standalone object system like what Ocaml has.
In other words, it should not double the size of the language.

>The rest is some kind of record coersion+row polymorphism mechanism.
>Yes, good point.
>That's what we meant: the object system in Haskell has been overlooked.

Haskell 98 does not have row-polymorphism, does it? Or am I overlooking

>If haskell can do what Simon P. Jones and Mark Jones described in the
><<Lightweight Extensible Records for Haskell>>, I'd say it is a already a
>nice functional OO language.
>It can readily do more than that:

Thanks. I'll certainly find some time to digest it.

>Compared to Ocaml, 'OO' support is seamlessly integrated with the
>functional part. It leaves no redundancy, no overlapping in the language.
>What are you referring to?
>I mean: where is OO support seamlessly integrated with the functional
>Do you refer to OOHaskell?

No. I did not look at OOHaskell yet. What I mean by seamless is the
'extensible record' proposal.
It is not created for OO, but it can be used to do OO.
Whatever I do, it is just an orthogonal piece of facility.
While Ocaml objects and functional part don't look quite orthogonal.

Haskell-Cafe mailing list
Haskell-Cafe at haskell.org

This message is intended only for the addressee and may contain information
that is confidential or privileged. Unauthorized use is strictly prohibited
and may be unlawful. If you are not the intended recipient, or the person
responsible for delivering to the intended recipient, you should not read,
copy, disclose or otherwise use this message, except for the purpose of
delivery to the addressee. If you have received this email in error, please
delete and advise the IT Security department at ITSEC at combined.com

More information about the Haskell-Cafe mailing list