caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Dave Berry" <Dave@kal.com>
To: "Brian Rogoff" <bpr@best.com>, <caml-list@inria.fr>
Subject: RE: [Caml-list] Style question
Date: Wed, 12 Sep 2001 11:24:38 +0100	[thread overview]
Message-ID: <8E31D6933A2FE64F8AE3CC1381EEDCE71040C0@NT.kal.com> (raw)

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


             reply	other threads:[~2001-09-12 10:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-12 10:24 Dave Berry [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-09-11 18:58 Krishnaswami, Neel
2001-09-12  9:14 ` Andreas Rossberg
2001-09-09 21:00 Brian Rogoff
2001-09-11  9:59 ` Andreas Rossberg
2001-09-11 10:55   ` Sven
2001-09-11 12:08     ` Andreas Rossberg
2001-09-11 12:16       ` Sven
2001-09-11 14:28         ` Brian Rogoff
2001-09-11 14:29         ` Andreas Rossberg
2001-09-11 18:11   ` Brian Rogoff
2001-09-12  9:03     ` Andreas Rossberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8E31D6933A2FE64F8AE3CC1381EEDCE71040C0@NT.kal.com \
    --to=dave@kal.com \
    --cc=bpr@best.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).