Browse thread
RE: [Caml-list] Style question
- Dave Berry
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Dave Berry <Dave@k...> |
| Subject: | RE: [Caml-list] Style question |
It's certainly not a style I would consider using in SML itself. I haven't written enough OCaml code to say how I would write this in OCaml. My preferred solution would be simply to allow a "local" prefix to any declaration, which would indicate that that entity would not be visible outside the current scope. Dave. -----Original Message----- From: Brian Rogoff [mailto:bpr@best.com] Sent: 09 September 2001 22:00 To: caml-list@inria.fr 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> end (* <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 ------------------- 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