On Mon May 20 10:55:06 2013, masak wrote:
> r: proto sub a($) {*}; sub a(Int $x) { "yay" }
> rakudo 8d2ec9: OUTPUT«===SORRY!===Redeclaration of routine
> a [...]
> shouldn't that work? from syn: ". A proto also adds an
> implicit multi to all routines of the same short name within its
> scope,
Hi,
According to synopsis 12 I could defer methods to methods in another object.
The case in which one can map some name into another didn't work out.
*
**
**class A {**
** method say-i (Int $i ) { say "I: $i"; }**
**}**
**
**class B {**
** has A $.n handles { :x };**
**
** submethod BUILD { $
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #126283]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126283 >
[12:14:07] hmmm...
[12:14:34] S06:1633 states: "In standard Perl 6, C is
# New Ticket Created by Elizabeth Mattijsen
# Please include the string: [perl #126284]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126284 >
[14:56:02] m: sub a(--> Int:D) { Int }; a # jnthn, is this
supposed to die
Makes sense. I went with TypeName{'arg'} and TypeName instead of
TypeName['arg'] which is actually better in some ways. I wanted it to look
like Type::Tiny a bit but I guess that's what inbuilt types are for :)
On Wed, Oct 7, 2015 at 2:53 AM, jn...@jnthn.net via RT <
perl6-bugs-follo...@perl.org>
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: 8ee967d2fa3464bffd640c8d5443c3dad1c8fec6
https://github.com/perl6/specs/commit/8ee967d2fa3464bffd640c8d5443c3dad1c8fec6
Author: jnthn
Date: 2015-10-07 (Wed, 07 Oct 2015)
Changed paths:
M S06-routines
Added tests:
https://github.com/perl6/roast/commit/fca109de6c
https://github.com/perl6/roast/commit/6e66b7a18d
Closing ticket.
# New Ticket Created by Larry Wall
# Please include the string: [perl #126291]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126291 >
22:28 < TimToady> m: say class { has Int:D $.foo is default(0) }.new
22:29 <+camelia> raku
# New Ticket Created by Larry Wall
# Please include the string: [perl #126292]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126292 >
> p6 'say map { $_ * 2 } <== 1 ... 10'
()(1 2 3 4 5 6 7 8 9 10)
> p6 'say map { $_ * 2 },0
Whoops, posted the wrong examples. These actually show the difficulty:
> p6 'say() <== map { $_ * 2 } <== 1...10'
(2 4 6 8 10 12 14 16 18 20)
> p6 'say() <== map { $_ * 2 },0 <== 1...10'
(0 20)
So this really looks like an insidious case of accidental one-arg semantics.
# New Ticket Created by Larry Wall
# Please include the string: [perl #126293]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=126293 >
23:17 < summa> m: say .squish;
23:17 <+camelia> rakudo-moar 472ea0: OUTPUT«(a a b b b c c)
11 matches
Mail list logo