http://www.perlmonks.org?node_id=1036465


in reply to Re: Should I give up Perl?
in thread Should I give up Perl?

Well I think PHP5 is a genuine OO language with features such as private and protected data, so used properly it is a reasonable programming language. Both Perl and PHP can be written well or poorly.

Rather than Perl being a direct help, I think a CompSci/Maths degree and 20 years+ experience helps. Doing a lot of C and assembly language encourages economy of code. :-)

If you spot any bugs in my solutions, it's because I've deliberately left them in as an exercise for the reader! :-)

Replies are listed 'Best First'.
Re^3: Should I give up Perl?
by tobyink (Canon) on Jun 01, 2013 at 20:29 UTC

    PHP has some nice OO features that I'd like to see in Perl, but also lacks some found in Perl - no multiple inheritance; traits are a very recent development and somewhat lacking compared to Moose's roles; overloading support is minimal (there's __toString, and the Iterable interface, but that's about it). I've personally always thought the introspection APIs, though quite comprehensive, are kinda clunky.

    PHP's OO is a very nicely designed part of PHP; arguably the only nicely designed part of PHP. ;-) If somebody were to take the basic syntax of PHP (minus <?php), and its OO system, but strip out all those gazillion globally namespaced functions, replacing them with a well-designed standard library of classes, that would be bloody lovely.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re^3: Should I give up Perl?
by LanX (Saint) on Jun 01, 2013 at 15:46 UTC
    OK you convinced me, give up Perl! =)

    Cheers Rolf

    ( addicted to the Perl Programming Language)