Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] dynamic runtime cast in Ocaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Walid Taha <taha@c...>
Subject: Re: [Caml-list] dynamic runtime cast in Ocaml

Hi Jacques,

Thank you for your quick responce.

On Thu, 7 Nov 2002, Jacques Garrigue wrote:

|From: Walid Taha <taha@cs.rice.edu>
|
|> Were nested quantifiers (either existentials or universals) considered in
|> the context of OCaml?  If not, are there plans to add them?  Thanks.
|
|I'm not sure of what you are asking about, and whether this is
|relevant to the question of runtime casts.

Sorry if it wasn't clear, but you've answered along the right lines.
Need to dynamic casting (outside specifics of the oo setting) sometimes
can be replaced by abstract datatypes (existentials) or dependent types
(which you mention below).

|If this is a question of type systems, then yes there are nested
|universal quantifiers in ocaml, which you can use either through
|object types (polymorphic methods), record types (polymorphic fields)
|or the module system (not first-class quantification, but this was not
|explicit in your question).
|For existential quantification, you only get it more or less with
|modules. Note that modules defined by "let module" are a bit weak in
|this context, as the types they define cannot escape their scope.
|
|Does this answer your question, or were you talking about something
|else?

Certainly.  Do you know if there are any plans to add nested quantifiers
explicitly?

|By the way, for the expressivity addict (Curry-style), there is now a
|branch in CVS with support for a specific form of dependent types. You
|can get it by
|  cvs update -r multimatch `cat testlabl/dirs_multimatch`
|(when it is not broken).
|I plan to provide it as a patch after the next release.

This sounds very interesting!  I'll check it.  Thanks!

Walid.

-------------------
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