RE: Local definitions

From: Adam P. Jenkins (ajenkins@javanet.com)
Date: Mon Oct 12 1998 - 19:20:11 MET DST


From: "Adam P. Jenkins" <ajenkins@javanet.com>
To: <caml-list@inria.fr>
Subject: RE: Local definitions
Date: Mon, 12 Oct 1998 13:20:11 -0400
In-Reply-To: <19981012133903.58898@pauillac.inria.fr>

> -----Original Message-----
> From: Pierre.Weis@inria.fr [mailto:Pierre.Weis@inria.fr]On Behalf Of
> Xavier Leroy
> > Why CaML doesn't not allow the following style of local definitions:
> > [...]
> > or, the second variant: simply allow declaration of
> > types, exceptions, open statements and others in "let-in"
> > expressions with the same translation:
>
> I think types and exceptions are best handled at the level of
> modules, if necessary by creating a sub-structure to restrict their scope.
>
> I've never found a convincing example of a type or exception
> declaration local to an expression.

I agree, I can't think of a situation offhand where I'd NEED a local type.
One thing that I do miss from standard ML though is "let open Module in...".
Often I just want to open a module inside one function rather than at module
level.

Adam



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:16 MET