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
Which syntax to teach ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-10-30 (18:50)
From: William D. Neumann <wneumann@c...>
Subject: Re: [Caml-list] Re: Which syntax to teach ?
On Tue, 30 Oct 2007 12:08:16 -0500, Edgar Friendly wrote

> That's more or less how I think of them.  Functions can be written with
> "holes" to fill in with their parameters.  In the same way, modules can
> have these "empty puzzle-spaces" that, once you fit the right kind of
> puzzle piece (module of the right type), you can plug it in (apply 
> the functor) to get a full module.

Unfortunately, on top of what one sees with HOFs, functors have a bit more 
baggage associated with learning how to use them effectively.  For one 
thing, the language is just different enough from the rest of OCaml to be a 
nuicance. And all of the extra bits needed to get the types to play nicely 
can really be hard to get a hold of (making types work as expected/desired 
seems to account for ~90% of the functor related questions to the mailing 
lists), and there's very little written up about it available for people to 
look at; section 2.4 of the manual only goes so far.


William D. Neumann