Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: polymorphic recursion
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Adam P. Jenkins <ajenkins@j...>
Subject: RE: Local definitions
> -----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