Re: Aliasing methods in CPAN roles

2009-10-19 Thread Raphael Descamps
Am Freitag, den 16.10.2009, 10:54 +0400 schrieb Richard Hainsworth: > Arising out of "Freezing Roles" is a related question. > > Suppose I download a module from CPAN with a role I want to use, but it > introduces a method that I want that is in conflict with an existing > method (say one taken

r28846 - docs/Perl6/Spec

2009-10-19 Thread pugs-commits
Author: lwall Date: 2009-10-19 19:20:38 +0200 (Mon, 19 Oct 2009) New Revision: 28846 Modified: docs/Perl6/Spec/S12-objects.pod Log: [S12] treat all delegation objects equally including arrays and hashes Modified: docs/Perl6/Spec/S12-objects.pod

Re: Aliasing methods in CPAN roles

2009-10-19 Thread David Green
On 2009-Oct-18, at 3:44 pm, Jon Lang wrote: David Green wrote: I would expect that role Logging { method log(Numeric $x:) {...} } means the invocant is really of type Numeric & Logging, without Logging having to do Numeric. On the other hand, I can see that strictly that might not make se

Re: Aliasing methods in CPAN roles

2009-10-19 Thread Jon Lang
Raphael Descamps wrote: > I personally don't understand why we don't have a exclude and alias > operator in Perl 6 but I have not read all the synopses and don't have > an overview. I don't think that it's explicitly spelled out anywhere; but the reason is fairly straightforward: exclude and alias

unusual invocants

2009-10-19 Thread Jon Lang
In "Aiasing methods in CPAN roles", David Green wrote: > Jon Lang wrote: >> David Green wrote: >>> >>> I would expect that "role Logging { method log(Numeric $x:) {...} }" >>> means the invocant is really of type Numeric & Logging, without Logging >>> having to do Numeric.  On the other hand, I can

Re: unusual invocants

2009-10-19 Thread David Green
On 2009-Oct-19, at 5:50 pm, Jon Lang wrote: In "Aiasing methods in CPAN roles", David Green wrote: I don't want my special log() method to work only for other types that explicitly do NumLog; I want it to work for any type that directly "does Numeric does Logging". But if Logging doesn't do

Re: Aliasing methods in CPAN roles

2009-10-19 Thread Jon Lang
Raphael Descamps wrote: > In the original traits paper the aliasing is not "deep": to respect the > flattening property, the semantic of the role must not change, so > aliasing a recursive method will call the original method. It's a known > theoretical weakness of the traits paper and "freezing ro

Re: unusual invocants

2009-10-19 Thread Jon Lang
David Green wrote: > Jon Lang wrote: >> In "Aiasing methods in CPAN roles", David Green wrote: >>> >>> I don't want my special log() method to work only for other types that >>> explicitly do NumLog; I want it to work for any type that directly "does >>> Numeric does Logging". >> >> But if Logging