Anyway, I just wanted to point out this one VERY cool thing (in my eyes) that was like the second or third test program I wrote.. Heck, I'd love to make this into a test for the test suite if it isn't covered... (it addresses a weakness that Perl 5 had, that was documented)..
This spits out...
my $foo = "1f9";
$foo++;
say $foo;
$foo--;
say $foo;
1g0A perl 5 equivalent will say...
1f9
2But Perl 5 supports a simpler increment system (sort of)...
1
This dumps out:
$foo = "f9";
$foo++;
print $foo . "\n";
$foo--;
print $foo . "\n";
g0Hooray Perl 6!
-1
(I found the test for this, it's S03-operators/autoincrement.t, it doesn't cover the "1f9" case, which doesn't work in Perl 5). I'll see if I can get commit bit access to this test next week!
No comments:
Post a Comment