4 ms·
It was explicitly not a design goal to be backwards compatible. "In exchange for breaking backwards compatibility, at least at the language level, Perl 6 offer
by jayvanguard 11y ago
It was explicitly not a design goal to be backwards compatible.
"In exchange for breaking backwards compatibility, at least at the language level, Perl 6 offers plenty of high-powered language concepts that Perl 5 didn't support..."
http://www.perl.com/pub/2006/01/12/what_is_perl_6.html http://www.perl.com/pub/2006/01/12/what_is_perl_6.html
- maw 11y agoThat's not what I read the GP post as saying though. Rather, that the perl 6 interpreter could run code written as perl 5 (and never ported). With their different semantics, the results would be unpredictable and often undesired.
- kylebgorman 11y agoFrom this document, the chance that a perl 5 script is syntactically valid (but semantically different) perl 6 is awfully low. Now if the errors that arose said that you might be trying to execute perl 5 as perl 6, that'd be cool ;)
- donaldihunter 11y agoThere are numerous error messages that highlight perl 5 isms e.g. > say $#array; ===SORRY!=== Error while compiling <unknown file> Unsupported use of $#variable; in Perl 6 please use @variable.end and package foo; ===SORRY!=== Error while compiling <unknown file> This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style declaration like "unit package Foo;" or "unit module Foo;", or use the block form instead of the semicolon form.
- amyjess 11y agoYes, these suggestions are among my favorite things about Rakudo. There are a lot more, too. Another example: > 1 == 1 ? "sane" : "insane" ===SORRY!=== Error while compiling <unknown file> Unsupported use of ? and : for the ternary conditional operator; in Perl 6 please use ?? and !! at <unknown file>:1 Or: > loop(my $i = 0; $i < 10; $i++) { say $i } ===SORRY!=== Word 'loop' interpreted as 'loop()' function call; please use whitespace around the parens at <unknown file>:1 Easily the nicest error reporting I've seen in a compiler.