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-09 (21:00)
From: Brian Rogoff <bpr@b...>
Subject: [Caml-list] Style question
I've been hacking a bit with SML lately and I notice that a lot of
SML code uses the local <private fundefs> in <public fundefs> end
construct. Do SMLers who like this and wind up writing OCaml use
modules for this? Something like

module SomeDefs : sig
  <public fundecls>
end = struct
  <private fundefs>
  <public fundefs>
(* <open or include> SomeDefs, or just use SomeDefs.f ... *)

or is the slight extra verbosity a disincentive?

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.

-- Brian

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