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
[Caml-list] Efficiency of 'a list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-05-05 (16:39)
From: Diego Olivier Fernandez Pons <Diego-Olivier.FERNANDEZ-PONS@c...>
Subject: Re: [Caml-list] Two types of efficiency (Was Efficiency of 'a list)

> You're kidding, right?  You're making a classic "best is enemy of
> the good" mistake here.  Yes, there are lots of implementations, and
> it's not clear which of them is absolutely optimal.  That doesn't
> mean ocaml shouldn't provide built-in support for one "good-enough"
> solution.  Such support doesn't preclude using whatever the optimal
> algorithm is for the situation.  But most of the time, it works
> fine, and having built in support improves the usability of the
> language greatly.

Having various algorithms/data structures improves the usability of
the language greatly, that is absolutely true.

But what you are describing is more the need of a 'large, standard and
uniform data structure library' than 'build-in' support.
- large, to handle all kind of situations
- standard, to insure compatibility
- uniform, to be able to switch easily between different

> I for one have never quite understood why the Set and Map modules
> only provide modular implementations, and why the API is relatively
> weak.

The Map and the Set modules of the standard library in Caml are a good
starting point : they may not be as complete as you would have liked,
of course but they will improve with time.

Keep in mind that designing a data structure library is a hard work :
Chris Okasaki, Ralf Hinze and a lot of others have failed ; Baire has
not even been released after 1 year of work, the geometric algorithms
in JDSL (Java data structures library) never arrived and after 2 years
the new version 2.1 does not provide any real improvment over 2.0.6,

The Caml standard library is in the 'not so bad' category

        Diego Olivier

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: