Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Why must types be always defined at the top level?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andreas Rossberg <rossberg@p...>
Subject: Re: [Caml-list] Why must types be always defined at the top level?
skaller wrote:
> 
>>Note that you cannot return values such that the module name escapes
>>its scope.
> 
> Which escapes me. Felix allows types to be defined
> anywhere and also allows them to escape, it creates
> no problem I'm aware of (except that you can't
> name them without resorting to the typeof() operator).

I believe the presence of syntactic names for all generative types is 
essential for the theoretical underpinnings of OCaml's type and module 
system.

> Topic ---------------------Language X ------------ Language Y
> Intermodule fun calls         Yes                       No
> Intermodule type recursion    Yes                       No
> Nest everything (excl funcs)  Yes                       No
> Nest funcs                    No                        Yes
> Full sep compil               Yes                       No
> Platform indep code           No                        Yes

How did you arrive at that table? AFAICS, the right column contains too 
many No entries (intermodule function calls, full sep compilation), 
while the left contains too many Yes entries (nest everything, or rather 
compositionality is definitely not given for C/C++, full sep compilation 
neither - considering that you have to manually share some code in 
header files).

-- 
Andreas Rossberg, rossberg@ps.uni-sb.de

Let's get rid of those possible thingies!  -- TB

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners