develooper Front page | perl.perl6.language | Postings from July 2005

Re: Elimination of Item|Pair and Any|Junction

Thread Previous | Thread Next
From:
Autrijus Tang
Date:
July 27, 2005 14:31
Subject:
Re: Elimination of Item|Pair and Any|Junction
Message ID:
20050727213146.GA31590@aut.dyndns.org
On Thu, Jul 28, 2005 at 03:55:55AM +0800, Autrijus Tang wrote:
> Hrm.  I thought the original motivation of forcing people to write
> 
>     Any|Junction
> 
> was precisely to discourage people from accidentally write
> 
>     sub foo (Any $x)
> 
> and have $x accept a Junction.  In other words, any() should not be of
> type Any.  Hence it still feels natural for me that Any occurs at the
> position of Mumble.

FWIW, if Any is to be ruled to be the top type and includes Junction,
then I support Darren's proposal of "Single", and maybe the Object type
can be simply eliminated to Any:

    Any - Item - Single
               - Pair
        - Junction
        - int, num, str

This also means that <int num str> will fit to Any via autoboxing.

Thanks,
/Autrijus/

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About