FWIW 'has $!a handles TypeObject' is now implemented, and works fine for
roles.
It doesn't work for classes, because they have a .new method. So the
standard .new is overridden, trying to call the .new on an attribute,
but since there's no instance yet, the access to the attribute fails.
That's
On Sat Feb 20 13:31:33 2010, masak wrote:
spinclad rakudo: say False ~~ True
p6eval rakudo ec47f3: OUTPUT«1»
masak o.O
spinclad (which is Worng)
colomon alpha: say False ~~ True
p6eval alpha 30e0ed: OUTPUT«1»
lue pugs: say False ~~ True
p6eval pugs: OUTPUT«»
* masak submits rakudobug
On Wed Apr 08 14:59:19 2009, moritz wrote:
23:55 @moritz_ rakudo: my @a = 1..4; say @a[1..*].perl
23:56 p6eval rakudo 6b9755: OUTPUT«[2, 3, 4, undef]»
It should just be [2, 3, 4].
Since the discussion came up on #perl6 if this is really the expected
behaviour, S09 says:
As the end-point
On Sun Jun 21 12:05:11 2009, moritz wrote:
21:03 @moritz_ rakudo: my @a = 1, 2, 4; sub f($a) { say $a };
f(|@a[*-1..*-1])
21:03 p6eval rakudo 1b06df: OUTPUT«argument doesn't arrayin sub f
(/tmp/2x4tmnOO68:1)called from Main (/tmp/2x4tmnOO68:2)»
I investigated a bit more,
On Sun Dec 07 07:24:07 2008, masak wrote:
The .subst method in Rakudo r33599 can understand :x()...
$ perl6 -e 'say foo1foo2foo3foo4.subst(foo, bar, :x(2))' # yes
bar1bar2foo3foo4
...and :nth()...
$ perl6 -e 'say foo1foo2foo3foo4.subst(foo, bar, :nth(2))' # yes
foo1bar2foo3foo4
On Wed Nov 19 07:35:48 2008, masak wrote:
masak what should the behaviour of sign($x) be when $x is complex?
I'd argue that it's a Failure.
If you care about complex numbers, you usually want an angle instead,
which you can get with Complex.polar. (And it's easier to give it a
another meaning