in reply to From Perl 5.10 to Perl 6

Simply said, the difference between 5.8 and 5.10 is small. There are some nifty new features but if you don't write "use 5.10" in your code you can't even use them.

perl 6 on the other hand is a mayor rehaul of the language, even perl4 to perl5 was a much smaller step. Your code won't run in perl6 without some rewrite, period. For example the way how sigils ($,@,%) work changes.

But that doesn't mean your perl5 code won't run anymore when perl6 is here, because perl5 will still be available as one of the languages (together with perl6) that all compile down to a virtual machine called parrot. If all goes according to plans you should be able to mix perl5, perl6 and other languages in your code.

Replies are listed 'Best First'.
Re^2: From Perl 5.10 to Perl 6
by JavaFan (Canon) on Dec 01, 2008 at 11:08 UTC
    Simply said, the difference between 5.8 and 5.10 is small. There are some nifty new features but if you don't write "use 5.10" in your code you can't even use them.
    That's not true. Some of the new features, even some nifty ones, are always available in 5.10. '//' for instance, and the new regexp features. New keywords however, which could conflict with existing code are only enabled if you use '-E', 'use 5.010' or 'use feature qw(...)'. This include 'state', 'given/when' and 'say'.
    But that doesn't mean your perl5 code won't run anymore when perl6 is here, because perl5 will still be available as one of the languages (together with perl6) that all compile down to a virtual machine called parrot.
    That's only true if you run Perl6 on an implementation that uses Parrot. Pugs for instance runs on top of Haskell and doesn't need Parrot (But I don't keep up with Pugs, it may very well be that it now has the ability to emit one of the Parrot internal languages). Of course, someone has to to make perl5 run on top of Parrot as well - currently it doesn't, and the only project I know of that tried to do this (Pony) died a slow death several years ago. Perl1 has been ported to Parrot though. Oh, and I haven't heard any solution of how to port XS code to Parrot short of rewriting it.
      Oh, and I haven't heard any solution of how to port XS code to Parrot short of rewriting it.
      Linking Parrot against libperl, and sharing runloops?

      That's probably not easy, but conceptually possible. (And notice that smop, another possible Perl 6 backend, already has XS bindings).

      the german wikipedia article mentions that the plan is (atm) to have Pugs compile down to perl5, Parrot, Haskell ...
Re^2: From Perl 5.10 to Perl 6
by pobocks (Chaplain) on Dec 01, 2008 at 06:04 UTC

    In fact, isn't it specified that any Perl script without "use 6.0" should be run in perl5 mode?

    for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";