caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
To: Arnaud Spiwack <aspiwack@lix.polytechnique.fr>
Cc: OCaml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Existential types and W
Date: Fri, 8 Jun 2007 23:54:00 +0200	[thread overview]
Message-ID: <E30FF58F-FC36-4349-BE68-11702F63C9BD@epfl.ch> (raw)
In-Reply-To: <4669BEDF.9010109@lix.polytechnique.fr>


Le 8 juin 07 à 22:41, Arnaud Spiwack a écrit :

> 1/ Do the reader of this list encounter the need of existential  
> type often?

Sometimes it can be useful to express an abstract type + operations  
without going through functors which only provide static existential  
types. This allows to store in the same datastructure such types +  
operations with different implementations. For example imagine a  
spatial datastructure with both float32 bigarrrays and regular caml  
float arrays.

> 2/ How would the addition of existential types impact the typing  
> algorithm of OCaml? (because I must confess that I have absolutely  
> no clue, would there still be a principal type to every expression?  
> would that increase complexity?)

I don't know.

But if you really need them they can be encoded in the current type  
system, see the discussion here [1].

Best,

Daniel

[1] http://caml.inria.fr/pub/ml-archives/caml-list/ 
2004/01/52732867110697f55650778d883ae5e9.fr.html

      reply	other threads:[~2007-06-08 21:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-08 20:41 Arnaud Spiwack
2007-06-08 21:54 ` Daniel Bünzli [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=E30FF58F-FC36-4349-BE68-11702F63C9BD@epfl.ch \
    --to=daniel.buenzli@epfl.ch \
    --cc=aspiwack@lix.polytechnique.fr \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).