On Tue, Aug 16, 2005 at 02:04:41PM +0100, Nicholas Clark wrote:
> On Thu, Aug 11, 2005 at 01:35:14AM +0800, Autrijus Tang wrote:
> > On Wed, Aug 10, 2005 at 07:32:01PM +0200, TSa wrote:
> > > Counting the sigil quadriga as 4, what is the fifth element?
> > & @ $ % :: 
> > In Perl5, :: is replaced by *.
> 
> Strictly in Perl 5 there are 7 types
> SCALAR, ARRAY, HASH, CODE, GLOB, FORMAT and IO.
> 
> (where IO might actually be 2 types, file handles and directory handles,
> and in turn FORMAT is implemented as a subtype of CODE.
>
> Also, internally there are 16 variants of SV*, with mostly a 1 to 1 mapping
> for all the types except SCALAR, which sort of absorbs the other 10. Except
> that the null SV type is easily directly morphable into any of the others.

It would be great if we can use a type-directed transform from Perl 5
syntax tree into PIL/Perl6, i.e. annotate each term with the 16
variants, maybe with union/intersection types that represents ambiguous
context, such as:

    f(reverse(g()));

Hm, I seem to remember that Gary Jackson (cc'ed) is working on that,
as his Summer of Code project.  Gary, can you share with us how you
plan to approach that, and/or how to get involved to your project?

Thanks,
/Autrijus/

Attachment: pgpjNvj5wXL3I.pgp
Description: PGP signature

Reply via email to