Am Montag, den 19.10.2009, 16:43 -0700 schrieb 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
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 from
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
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
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 roles
On 2009-Oct-17, at 1:55 am, Jon Lang wrote:
This implies that both Logging and Math do Numeric, since the
invocant ought to be of a type that the class does.
I would expect that
role Logging { method log(Numeric $x:) {...} }
means the invocant is really of type Numeric Logging, without
David Green wrote:
Jon Lang wrote:
This implies that both Logging and Math do Numeric, since the invocant
ought to be of a type that the class does.
I would expect that
role Logging { method log(Numeric $x:) {...} }
means the invocant is really of type Numeric Logging, without Logging
David Green wrote:
Aha, so the bark:(Dog:) syntax identifies the method by its signature as
well, thus distinguishing it from the .bark:(Tree:) method. This works fine
when the sigs can distinguish the invocants, which is very common. However,
I could have ambiguous methods even including
On 2009-Oct-16, at 12:54 am, Richard Hainsworth wrote:
Is there syntactic sugar for aliasing the conflicting method? Eg.
something like
does XML :db-writexml-db-write;
There needs to be something more than sugar: making a new class or
role with different methods will break