From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: skaller <skaller@maxtal.com.au>, Manuel Fahndrich <maf@microsoft.com>
Cc: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: Re: Rebinding exception declarations
Date: Sun, 17 Oct 1999 16:22:29 +0200 [thread overview]
Message-ID: <19991017162229.01608@pauillac.inria.fr> (raw)
In-Reply-To: <38065E9C.E03FBF19@maxtal.com.au>; from skaller on Fri, Oct 15, 1999 at 08:52:12AM +1000
> Actually, I think there is a more syntactic problem: ocaml uses
> special 'kinds' of bindings, for some reason that escapes me:
>
> type X = ..
> class X = ..
> exception ..
> let X = ..
> let rec X =
> module X =
The reason is easy: the syntax and the meaning of the right-hand side
depends on the 'kind' of the thing being bound. E.g. "t * t" in the
right-hand side can be a product type (for a type t = declaration)
or a squaring operation (for a let x = declaration).
Even human readers need the initial keyword to know how to make sense
of the definition, I guess.
> which permit recursion with an 'and' option. Unfortunately,
> this syntax does not permit these kinds of bindings to be
> mutually recursive (quite aside from the semantic issues).
The problem is exactly "semantic issues". We know how to type-check
and compile mutually-recursive value definitions, and also
mutually-recursive type definitions. Mutual recursion between module
definitions, for instance, is a research problem that is still mostly
open. Mutual recursion between, say, a module and a class seems at
least as problematic.
Coming back to Manuel Fähndrich original point on rebinding of
exceptions: this looks like a natural thing to have. We can rebind
datatype constructors already, so why not exceptions. I'll see what
we can do about it.
- Xavier Leroy
prev parent reply other threads:[~1999-10-18 14:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-13 16:59 Manuel Fahndrich
1999-10-14 22:52 ` skaller
1999-10-15 7:12 ` Pierre Weis
1999-10-17 11:15 ` skaller
1999-10-17 14:22 ` Xavier Leroy [this message]
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=19991017162229.01608@pauillac.inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@inria.fr \
--cc=maf@microsoft.com \
--cc=skaller@maxtal.com.au \
/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