in reply to OT? Pragmatic Perl

One of the problems with people's impression of perl6 is that nobody pays attention to the things that are the same. All the procedural bits of perl5 are still there. Most perl6 will look mostly like perl5, with little differences, and mostly ones that don't effect how you think. $foo[5] becomes @foo[5]. Big deal. Keep on writing perl6 the way you wrote perl5, and you'll produce perfectly good perl6 code. OTOH, when you want to write things like if (any(@foo) == 5) {...}, they're there for you, as is if (5 < $x <= 10) {...}.

There are bits of perl6 that are probably overdesigned for most purposes -- but they're nice to have when you want them there, and when you don't want them there, they stay out of your way.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re^2: OT? Pragmatic Perl
by Anonymous Monk on Sep 24, 2004 at 16:30 UTC
    One of the problems with people's impression of perl6 is that nobody pays attention to the things that are the same. All the procedural bits of perl5 are still there. Most perl6 will look mostly like perl5, with little differences,
    But the differences are important and there are *many*! Sure, I might need only a few relatively minor changes to *write* perl code that runs on perl6. But I (and many many others) need to *read* code too. The only people for whom your argument works are people who may need to *write* perl6 code once in a while. Once a shop decides to switch to perl6, everyone needs to learn the perl6 language (not just the minor syntax differences with perl5). It will be no less a leap than a shop switching from Perl to Python or to Ruby (and may even be harder just due to the perceived similarity).
      But I (and many many others) need to *read* code too.

      You learned how to read Perl 5. You learned how to use all of the libraries you know how to use. Heck, you either learned how to read the indentation, naming, idioms, and commenting style of all of your co-workers -- or you came to some agreement on a shared style.

      What prevents you from doing the same thing here?

        My point wasn't that perl6 can't be learned, just the opposite, that it must be *learned*. And that knowing perl5 won't be much of a help. To put it another way: Once my shop switches to perl6, a new hire that only knows perl5 has no real advantage over a new hire that only knows python. Both will have to *learn* perl6.

        People who keep arguing about how trivial it will be to convert perl5 code into working perl6 code belittle the fact that perl6 will be a new language and that switching to perl6 will involve a lot more than just writing perl5 in perl6. A perl5 programmer moving to a perl6 shop probably has as much of a learning curve ahead of them as a perl5 programmer moving to a python shop (or a python programmer moving to a perl6 shop for that matter).

        I don't have a problem learning perl6, and I've kept up with perl6 development as best as I can. I have a problem with people who trivialize what the cost of switching to perl6 will entail.