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] Teaching OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-02 (17:41)
From: Holger Schulz <schulz@m...>
Subject: Re: [Caml-list] Teaching OCaml

Am 18.05.2004 um 10:52 schrieb Richard Jones:

>> Iif you want practical features of OCaml, you could try the classic
>> "QuickSort in n lines" where n depends on how efficient you want to
>> make it, but you can still achieve O(n log n) in something like 4
>> lines.  It takes 10 or so to be efficient, compared to at least 50 in
>> C.  Of course, Haskell has even nicer syntax for this, but it looks
>> good in O'Caml too.
> Sorry, but why is this a "practical" feature of OCaml?

I'm not quite sure if it is a practical feature but it is an important 
aspect on teaching programming to have code which is easy to survey.

> Anyone who uses OCaml to sort things will use List.sort, unless they
> have incredibly specialist sorting requirements, in which they
> certainly won't be using a 4-line implementation of quicksort.

Hm, learning algorithms includes implementimg them, even if that has 
been done before.

By the way: are the 4 or 10 line source available online anywhere? I'd 
like to take a look at.

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