|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Developer's Dilemma: Perl or PHP?
by agentv (Friar) on Nov 12, 2002 at 19:33 UTC | |
Devloper's Dilemma: Perl or PHP? Yes! - 30 - The question is a silly one because nobody has to choose. You should select an approach for a given job that factors the problems related to the job and the resources at hand. An "either/or" answer to this question is only necessary for the weak programmer who can only manage to learn one language. PHP is a fine language. So is Perl. So is Java. So is VB (although it feels like heresy to say that here) :-). So even we are not immune to our prejudices here. But the bottom line is you can have it all. You can have PHP and you can have Perl, and you don't have to agonize over what to write on the purchase order. They're both available to you. For a large project that requires several developers working in concert, I would tend to favor a strongly typed language. If there is a job that needs to be finished right away and only one person has to do the work, then I would favor a language that offers the shortcuts that get code finished fast. (Both PHP and Perl offer advantages in this respect.) But to phrase the question implies that some sort of dogma must be present in the answer, and I'm here to tell you that religion has *No Place* in engineering. On the other hand, I love to come upon shops that have succumbed to dogma in their past. They present rich consulting opportunities for the rational engineer.
...All the world looks like -well- all the world,
when your hammer is Perl.
...I realize that this call-and-response type of node has appeared many times in the life of Perl Monks, but perhaps someone newly visting will see this one and find their way to the additional volumes of text that have been written on the topic. ---v | [reply] |
|
Re: Developer's Dilemma: Perl or PHP?
by coreolyn (Parson) on Nov 13, 2002 at 14:37 UTC | |
I should know better than to react to such a troll but for some reason my knee is jerking "Perl is a write-once language, which PHP isn't. Perl is as reusable as you write it to be. If you stop at just getting something to work rather than coding for reusability you can't blame the language for allowing an optional way of accomplishing a given task Perl is so different from other languages, that each time you have to write something in Perl after not having programmed Perl for a while, you have to relearn. Perl is a mix of languages. Rather than being so different it incorporates the best of many. If you write code often in any language Perl is a bicycle you can get back on as easy as any other. Therefore, only core Perl-hackers that more or less only program Perl, deliver high-quality Perl programs. I highly doubt that a language that only 200 or so developers could use well would have lasted this long or still recieve as much support as Perl. Only good coders deliver good code in any language. The rest deliver buggy programs that will have to be rewritten from scratch next time they have to change a little. I'm far from a core Perl programmer, and I have to confess that the bulk of my coding these days is in Java. Yet somehow. I have several applications that have been running day after day for a few years now in high volume developement and production environments. They are always needing an enhancement, and because I wrote the code thinking in a 'bigger' more long term picture. I come off looking great by just reading my documentation and tweaking a few lines. Any language is what you make of it. coreolyn | [reply] |
|
Re: Developer's Dilemma: Perl or PHP?
by geewiz (Novice) on Nov 13, 2002 at 12:08 UTC | |
The article concludes "For the uninitiated, PHP is more newbie-friendly, but Perl has a richer set of resources to draw on over the long term." And I think, if a project is to be taken seriously, it has to consider the long term. What value has a quick start if I get stuck only a few km on the way? One of the big advantages of Perl is the availability of code for almost every purpose under heaven (phrase inspired by one of the last poems :)) PHP's PEAR still has a long way to go until it'll be comparable to CPAN. Another thing I prefer Perl over PHP for is that it's suited for more than just WWW applications. I can write the offline CLI tools for our WCMS in the same language the mod_perl based WCMS itself is written in. I can even use the same language to program scripts I administer our Linux systems with. Perl is to me what the Swiss army knife is to... er... the Swiss army, obviously. And, to drive this comparison home: Using a Sharp Zaurus, I, too, never leave home without it. :-) Granted, there are ways to make a Perl script completely non-understandable. But this problem exists in almost every programming language, certainly also in PHP. If the developer invests the necessary time, she can make her Perl script very readable, even by the novice. The biggest advantage of PHP is indeed its steep learning curve. But in the long term, Perl's advantages are far more important to me. Best regards, | [reply] |
|
Re: Developer's Dilemma: Perl or PHP?
by dmitri (Priest) on Nov 12, 2002 at 23:26 UTC | |
The bottom line is, don't use it. Take it from someone who knows the pain and suffering of maintaining PHP codebase. | [reply] |
by BUU (Prior) on Nov 12, 2002 at 23:57 UTC | |
? (note: if anyone takes this at all seriously, you should remove yourself from the gene pool immeadiately. note2: all credit for this monstrosity goes to: felonious from this node | [reply] [d/l] |
by dmitri (Priest) on Nov 13, 2002 at 00:00 UTC | |
| [reply] |
|
Re: Developer's Dilemma: Perl or PHP?
by jryan (Vicar) on Nov 13, 2002 at 00:37 UTC | |
| [reply] |
|
Re: Developer's Dilemma: Perl or PHP?
by Anonymous Monk on Nov 12, 2002 at 18:53 UTC | |
| [reply] |
by agentv (Friar) on Nov 12, 2002 at 19:39 UTC | |
Yes. If you are truly interested in the answer to this, you might enjoy this article. (Unless of course, you are only interested in answers to the question that match your preconceptions.)
...All the world looks like -well- all the world,
when your hammer is Perl.
| [reply] |