Thank you very much for your answers. As I said in my post I knew the synopsis, but I hoped to have something more precise. I will explore it again by using Timoty roadmap

On 02/05/2010 01:59 AM, Darren Duncan wrote:

G. Castagna: Covariance and contravariance: conflict without a cause. ACM
Transactions on Programming Languages and Systems, vol. 17, n. 3, pag. 
431-447, 1995.

Is there an electronic copy of this that you can link to?

Ah, spoke too soon.  An electronic copy is linked to from one of the other
sites you gave, at ; the PDF
version is at .

Well, glad you found the "contravariance" paper. For what concerns CDuce, the language is included in most linux distributions (Ubuntu Debian, Fedora, Mandriva, at least). For the type system, while I think that the "contravariance" paper is rather accessible (I hope), the most accessible presentation for CDuce types is probably the joint keynote talk I gave at PPDP and ICALP, that can retrieved here

while it is a little bit technical, you can use the covariance paper as a key of reading: the type of an overloaded function (set of arrows) is there an intersection of the arrows.

And by "union types", I mean both that you can say "Dog | Cat" (syntax?) to
allow either Dog or Cat values, and also that Perl 6 roles effectively
declare union types but that the members add themselves to the union rather
than the union itself declaring what it ranges over; in the latter case, the
union type is "every value that does this role".

Well union for must are just ... unions. So the type Int | Bool | "Dog" is intuitively the set {"Dog", true, false, 1, 2, 3, ....}. That is, both enmuerated sets, and set theoretic unions.

Finally, if you use the CDuce type theory for Perl 6 you obtain for free pattern matching for XML values, if you are interested in it (probably it will require a little effort to make the syntax compatible with perl regexps).

I see I'm going out of the scope of this list. I apologize for spamming, but please continue to post here or send me by PM every information about Perls 6 types.


Reply via email to