Re: Can a Perl Programmer Pick up PHP quickly?



X-Ftn-To: Mladen Gogala

Oprosti sto nisam odgovorio, ali reader mi se cudno ponasa pa nisam prije
vidio poruku. :)


Mladen Gogala <gogala@xxxxxxxxxxxxx> wrote:
>> It is, but you can soon find struggling with php if you want to do something
>> more => http://tnx.nl/php
>
>Ah, another PHP hater, and a countryman at that. No, no struggling is
>necessary. PHP is easier to learn then perl. Much easier to learn. On the

I don't see who claimed otherwise, of course it's easier to learn php; the
question is how far can you go with that knowledge? The page above shows the
php4 traps which are actually facts and are not subject to somebody personal
preferences (eg. liking/disliking over syntax/language philosophy).

>other hand, for the CLI environment, perl rulz. I started with perl few
>weeks ago, when subroutines were called with "&" and curent version was
>perl 4.0.36. As an oracle DBA, I used oraperl variety, a predecessor to
>DBI/DBD::Oracle. It was 1995. PHP5 was a breeze to pick: no @ISA, no
>$AUTOLOAD, no tie, no hidden first arguments, just classes, methods and
>inheritance, the way they're meant to be.

There is a price tag for power and it all depends if you'll need it and if
you are ready to pay for it. I agree that perl OO isn't the best thing out
there but personally, I would rather embrace demanding but consistent
language over non consistent and unexpectedly behaving one.
I think that python/ruby/java folks would also agree on that, and they don't
have much in common.
"Let those who have the ears to hear - hear.." ;)

>PHP functions are, on the other hand, well documented, books are complete,

I'll strongly disagree on documentation as it lacks completeness. As an
illustration to that, there are many user comments(threads actually) below
documentation that deals with solving various gotchas.

>unlike "Learning Perl", which skips things like references, packages and
>objects. To learn Perl, you need at least 3 books: "Learning Perl",
>"Programming Perl" and Conway's OO Perl. It is much easier to learn PHP
>then to learn Perl.

Yes, but it's also easier to learn logo then php. :)
imho, so long as your tool can do what you want, there is no need to change
it.

>On the other hands, Perl has formats, and PHP has
>nothing like a built-in report writer. I love both Perl and PHP, PHP for
>the web, Perl for CLI. Perl with its arcane secrets and tricks that can be
>learned only through the word of mouth

So, Conway did tell you everything in person as it also did to me? ;)
perldoc perl, and perldoc perltie looks enough

>and bizarre mechanisms like "tie"

afaik, there is nobody forcing anybody to use ties or similar. Ties are
transparent to user and exist to make life easier if you need it, but you
can also live long and well without them.

>is much, much harder to learn. This comes from someone who uses both perl
>and PHP. That page is rubbish. For the real PHP hater page look for the

I don't know if author of that page hates php or not, but there are some
real arguments which stand equally in all emotional contexts.



--
Matija
.



Relevant Pages

  • Re: What are the differences between Perl and PHP when handling with Web pages
    ... What are the differences between Perl and PHP? ... anyway for the sake of good programming practice. ... I end up using PHP more for web development than PHP. ...
    (perl.beginners)
  • Re: Can a Perl Programmer Pick up PHP quickly?
    ... PHP is not easier compared to Perl. ... a language with fewer features is going to be easier to ... You can't call documentation guessed after the source not good ...
    (comp.lang.perl.misc)
  • Re: Coverting perl to php
    ... I am bout ready to convert it to php but wonder if there are ... but there's nothing to match a good perl person porting their ... The reason for the rewrite is because a large chunk of the ancilary ... code to talk to the database, recreating what they did, and having 2 ...
    (comp.lang.php)
  • Re: Face lift survey
    ... But PHP, I think, integrates html code a better way. ... you still have to do a perl script and then put ... Perl CGI programming! ...
    (perl.beginners)
  • RE: What are the differences between Perl and PHP when handling with Web pages
    ... I think perl can be used for more applications than PHP. ... You don't really need scripting to build a web site. ... there are people programming in PHP and perl. ...
    (perl.beginners)