English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Style question
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-09-11 (09:59)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] Style question
Brian Rogoff wrote:
> It seems to me that all of the uses of local in SML can be handled can be
> handled by the module system in OCaml, and I don't even find the unsugared
> forms to be bad at all.

It is not exactly sugar since you can express things with local that you
cannot with signatures - but all of them are pretty useless. My personal
opinion is that using modules is preferable even in SML, its local being
an anachronism from the pre-module days, just like abstype. I almost
never use it. It only comes in handy in conjunction with open:

	local open M in

Of course, in OCaml this is solved by having open vs. include.

	- Andreas

Andreas Rossberg, rossberg@ps.uni-sb.de

"Computer games don't affect kids; I mean if Pac Man affected us
 as kids, we would all be running around in darkened rooms, munching
 magic pills, and listening to repetitive electronic music."
 - Kristian Wilson, Nintendo Inc.
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr