Raku / old-design-docs

Raku language design documents
https://design.raku.org/
Artistic License 2.0
124 stars 36 forks source link

S03: 42 x *, 42 xx *, 42 x Inf, 42 xx Inf #95

Open AlexDaniel opened 9 years ago

AlexDaniel commented 9 years ago

From S03:

$string x $count … The count may not be * because Perl 6 does not support infinite strings. (At least, not yet...)

However, the implementation is different:

m: say 'test' x *; rakudo-moar ee36da: OUTPUT«WhateverCode.new␤»

m: say ('test' x *)(5) rakudo-moar ee36da: OUTPUT«testtesttesttesttest␤»

And it seems like this behavior makes more sense. In other words, xx Inf is infinitite list, x Inf is an error, x * and xx * – currying.

Related rakudobug: https://rt.perl.org/Public/Bug/Display.html?id=125627

IRC log: http://irclog.perlgeek.de/perl6/2015-07-16#i_10908664

According to the IRC log people seem to like that.