John M. Dlugosz wrote: > Here is a first look at the ideas I've worked up concerning the Perl 6 type > system. It's an overview of the issues and usage of higher-order types in > comparison with traditional subtyping subclasses. > > http://www.dlugosz.com/Perl6/
Very interesting, if puzzling, read. I'm having some difficulty understanding the business with £. I _think_ that you're saying that £ sort of acts as a prefix operator that changes the meaning of the type with which it is associated; and the only time that a change in meaning occurs is if the type in question makes use of ::?CLASS or a generic parameter. You say that in Perl 6, a role normally treats ::?CLASS as referring to the role. Perhaps things have changed while I wasn't looking; but I was under the impression that Perl 6 roles try to be as transparent as possible when it comes to the class hierarchy. As such, I'd expect ::?CLASS to refer to whatever class the role is being composed into, rather than the role that's being composed. If you have need to reference the role itself, I'd expect something like ::?ROLE to be used instead. Of course, without something like your '£', the only way to decide whether you actually want the class type or the role type would be within the definition of the role itself; and without a sort of "reverse '£'", there would be no way to take a role that refers to ::?ROLE and make it refer to ::?CLASS instead. That said, I'm not convinced that this is a problem. As for classes and roles that have generic parameters: here, you've completely lost me. How does your proposed '£' affect such classes and roles? -- Jonathan "Dataweaver" Lang