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

Generic classes.

Thread Next
From:
Autrijus Tang
Date:
August 14, 2005 05:27
Subject:
Generic classes.
Message ID:
20050814122833.GA53143@aut.dyndns.org
S06 made many explicit uses of generics as classes, which I find
difficult to reconcile with the "only roles takes type parameter"
ruling.  For example:

    my Hash of Array of Recipe %book;
    my Hash[returns=>Array[returns=>Recipe]] %book;

And later:

    class LoudArray is Array { ... }

Clearly, here Hash and Array are used as instantiable, generic classes,
instead of mere roles.  Does this need to change, or can we lift the
ban on type-parameterized classes?

Thanks,
/Autrijus/


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