Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: Looking for a nail
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michel Schinz <michel.schinz@c...>
Subject: Re: Looking for a nail
Markus Mottl <> writes:

> There is even a much more radical approach concerning OO: Make all
> basic types classes! This would e.g. allow to put all kinds of
> values into a list and iterate it with a print function - just one
> of many other then possible things I miss...

I'm not sure this is such a good idea for CAML. The non-OO part of
CAML is quite mature, while the OO part is more like research. Forcing
everybody to use CAML as an OO language is IMHO not a very nice thing.
I do not use the OO part of CAML at all right now, and I'm pretty sure
I'm not the only one. I think we need more experience with the OO part
of CAML (or, more fundamentally with OO programming in a functional
language) before choosing to use it for basic types.

Don't get me wrong, I have nothing against purely-OO languages. I
*love* Self, Smalltalk, ... I just think that it's not appropriate for
CAML at this time. Later, when we have more experience, maybe, but not

> As Okasaki shows, most kinds of data structures can be implemented
> in a very efficient and still purely applicative way. I am not sure
> whether there are many data structures that deserve their existence
> in both forms...

I think that having arrays with in-place modification is almost a
must, for example. For some applications, having only functional
arrays is pretty awful.

I agree with you that for some data-structures, having a
non-functional version when the functional one is efficient is maybe
not such a good idea.