in reply to Re^7: Moose - my new religion
in thread Moose - my new religion

I'm not involved enough to have an opinion about when/if Perl 6 will be ready for everyday use. But my impression from looking at some examples is that it's practically a different language. The jump from 4 to 5 included some major changes, but the language still looked pretty much the same, as I recall. Perl 6 code that I've seen doesn't look that much like Perl 5 code, except for retaining the sigils (to be fair, that may be because the examples tend to focus on things Perl 5 doesn't have). So I get the feeling that using it will mean learning a new language, to a large extent, rather than simply adding some new features to the one I already know.

There's nothing wrong with that -- the designers should do what they want, and !omelette unless $eggs->scrambled() and all that. But I don't know if I'll be any more likely to switch to Perl 6 than to switch to Ruby (to mention another language I don't know which is said to combine a lot of Perlish features with Smalltalk/Lisp ideas). I may very well switch to Perl 6 eventually and decide it's the best thing since sliced bread, but it certainly won't be an automatic thing.

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.

Replies are listed 'Best First'.
Re^9: Moose - my new religion
by cavac (Prior) on Nov 26, 2011 at 18:09 UTC

    I have similar thoughs. Will i be forced to ditch all i wrote the last decade in Perl 5?

    Or will i be able to use my existing code on Perl6, writing new code in 6 and slowly turn existing 5-code into 6 whenever i have the need to rewrite/re-engineer one of the "old" modules anyway.

    If i have the start from scratch anyway, i might as well choose an older language with a bigger userbase and a bigger asset of preexisting open source code. It just would get me working productive a lot faster.

    On the other hand, if i could do a gradual switch from Perl 5 to Perl 6, i would "waste" a lot less time, could reuse whatever i had slaved and brainstormed over the last ten years and have the huge CPAN assets at my fingertips whenever i have to build something in a hurry...

    Don't use '#ff0000':
    use Acme::AutoColor; my $redcolor = RED();
    All colors subject to change without notice.
      Unless things have changed, Perl 5 work will be compatible with whatever eventually becomes Perl 6. Anyone else foresee a code clusterfuck on the horizon?
        Unless things have changed, Perl 5 work will be compatible with whatever eventually becomes Perl 6.

        Someone would have to work on that seriously. A couple of proofs of concept have existed, but they tend to bitrot before they get anywhere close to complete.

        Until someone shows you working code which solves non-trivial problems and demonstrates that said code will remain working for longer than a couple of releases, assume you won't be able to use Perl 5 code or the CPAN from a Perl 6 implementation any time soon.


        Improve your skills with Modern Perl: the free book.

        Perl 6 is expected to have a backwards-compatibility mode, yes, but that's not really the point for me. I'm not worried about my Perl 5 code becoming obsolete; I assume I'll be able to run it in Perl 5 just fine for many years to come.

        It's taken me years to learn to write "good" Perl 5: using Perlish idioms like die unless(something) and for(0..9){ instead of for($i=0;$i<10;$i++){, not cluttering things up with unnecessary parentheses, writing clearer regexes by using better delimiters and /x, using the power of map, etc. If I make the move to Perl 6, it'll be because I want to take similar advantage of its new powerful features; not so I can continue to write Perl 5 code and let it translate.

        Look what happens here when people post code that appears to have been cut and pasted out of a 1998 tutorial. Even when it's technically correct and works, they're encouraged to modernize it with strict, the 3-arg open, etc. If I start using Perl 6, I don't want to be like that, writing code that technically works but only because the language designers have taken mercy on me. I'll want to write good Perl 6 code, which appears to mean I'll need to learn quite a lot of new stuff -- and maybe unlearn some things, since it appears $array[0] will be @array[0], for instance.

        Again, that may not be a bad thing, and may be very much worth it; but it makes it more of an open question than just "upgrading" to a new version of a language.

        Aaron B.
        My Woefully Neglected Blog, where I occasionally mention Perl.