Slashdot Mirror


Perl6 for Mortals

horos1 writes: "Hey all, I just ran across an article over at O'Reilly - Perl 6: Not Just For Damians which covers a lot of the negative commentary posted by slashdot on perl6 'featureitis'. Very interesting read, and IMO makes a hell of a lot of sense."

3 of 224 comments (clear)

  1. Re:Is it really. - FUD by Pengo · · Score: 4, Interesting


    Hmm.. I hear the same fud when people talk about using Python for simple , quick and dirty scripts, etc. Just because Python gives you the ability to create classes , as well as advanced OOP features for a scripting language, doesn't mean that you have to use it at all.

    I have seen and written many useful python scripts that do nothing more than impliment one function and the rest is just run out of the main.

    With Perl moving (IMHO) maybe it's worth putting a few Python books aside and giving perl another look. (I haven't touched it for 2-3 years since I started doing Java programming and discovered python).

    But these features are only as complicated as you force them to be.

    BTW, Java can be as fast, if not faster, than perl for many many tasks. It all depends on how you write the code. Bad code can be written in any language. But frankly I wouldn't write Perl code where I would use Java, as I don't do that with Python. Like trying to use Bash scripts where perl / python would be needed.

  2. Re:Is it really. by ajs · · Score: 4, Interesting
    Now can you please tell me why the fsck do I need a full-fledged object-oriented language to write scripts for cron jobs and CGI?

    You don't. So don't use objects.


    I agree with most of your response, and am happy that someone was so level-headed about it. However, I write cron jobs all the time that use LWP, which would be a major pain if it were not OO.


    • my $ua = new LWP::UserAgent;
      $ua->timeout(10);
      my $rq = new HTTP::Request('GET','http://x.y.z/');
      my $rsp = $ua->request($ua);
      die "$0: x.y.z is down!\n" if $rsp->is_error;


    The bottom line is that TMTOWTDI.

  3. Re:Filehandles by Piers+Cawley · · Score: 4, Interesting
    What version of perl are you using? In 5.6.0 and later


    open my $fh, $file or die;


    will give you a nice shiny, lexically scoped filehandle.


    And yeah, $| = 1 is a historical PITA. It's going away in Perl 6 though. Hurrah!