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

Re: Elimination of Item|Pair and Any|Junction

Thread Previous | Thread Next
Autrijus Tang
July 27, 2005 14:31
Re: Elimination of Item|Pair and Any|Junction
Message ID:
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.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About