caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dave Berry <dave@kal.com>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>, bpr@best.com
Cc: caml-list@inria.fr
Subject: RE: [Caml-list] two unrelated questions
Date: Tue, 1 May 2001 18:25:54 +0100	[thread overview]
Message-ID: <3145774E67D8D111BE6E00C0DF418B66427149@nt.kal.com> (raw)

Even a top level exception can escape its scope, e.g. if a signature doesn't
include an exception raised by one of the functions in the signature.  The
problem I (as an SMLer) cite most often is exceptions - not just local
exceptions - escaping their scope.

Having said that, I think it best to have two distinct features: exceptions
and breaks.  Exceptions are top-level, monomorphic, and comparatively easy
to track.  Breaks are declared in function bodies, potentially polymorphic,
and should be banned from exiting the scope of their declaration.  This
would entail limits on how breaks could be used, to make the flow control
tractable.  I don't know whether there is a suitable flow control algorithm
that would give reasonable flexibility while still ensuring this safety
requirement.


-----Original Message-----
From: Jacques Garrigue [mailto:garrigue@kurims.kyoto-u.ac.jp]
Sent: Tuesday, May 01, 2001 2:31
To: bpr@best.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] two unrelated questions

That is, defining local exceptions (and local types also) is a very
fine way to shoot oneself in the foot. You end up having plenty of
exceptions (or types) with the same name (impossible to distinguish at
toplevel), but incompatible. 

For exceptions, logically a locally defined exception escaping its
scope should be a fatal error, but this is not the case (cannot be
really enforced). So you can end up at toplevel getting an exception
of an unknown name, impossible to catch. (This is the problem SMLers
cite most often).

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


             reply	other threads:[~2001-05-01 17:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-01 17:25 Dave Berry [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-04-25 21:08 Chris Hecker
2001-04-26  0:38 ` Patrick M Doane
2001-04-26  6:04   ` Judicaël Courant
2001-04-26 12:06     ` John Max Skaller
2001-04-27  9:12       ` Anton Moscal
2001-04-29 22:24         ` Brian Rogoff
2001-04-30 18:57           ` Fergus Henderson
2001-05-01  1:31           ` Jacques Garrigue
2001-04-27 15:09       ` Brian Rogoff
2001-04-27 17:49         ` John Max Skaller
2001-04-26  8:22   ` Andreas Rossberg
2001-04-26  1:13 ` Jacques Garrigue
2001-04-26 13:47 ` Xavier Leroy
2001-04-26 22:34   ` Chris Hecker
2001-04-26 16:57 ` Mark Seaborn
2001-04-26 22:20   ` John Max Skaller
2001-05-01 21:08     ` Brian Rogoff
2001-05-01 23:30       ` John Max Skaller
2001-05-02  0:03       ` John Max Skaller

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=3145774E67D8D111BE6E00C0DF418B66427149@nt.kal.com \
    --to=dave@kal.com \
    --cc=bpr@best.com \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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).