As I've said to countless people countless times, GIVE IT TIME. PHP may not be as popular or as efficient as Perl is today, but you need to see where its coming from. Perl has a much older history yes, but it was never meant for the web per se, although it has adapted wonderfully.
The fact that PHP lets a total newbie start writing applications isn't really a problem to me, in fact, this makes it a great language to learn web programming. Only programmers who are insecure about their own skills would think that this is a bad idea.
Perl moved from being a general pupose scripting language to a web-based language. I don't see why PHP can't go the other way. As for multiple inheritance, then by your definition C#, Java and countless other languages aren't OO compliant since they only support multiple inheritance for interfaces. Besides, many successful PHP applications have been written using PHP's OO support. Check out the HTML MIME class, or the Pear classes for sending email.
As for the number of modules. All I can say is, open your eyes and look around. At the rate modules are getting written for PHP, it won't be long before it surpasses Perl. The only aspect where Perl actually scores over PHP is speed, but with most users having sub 1 Mbps connections to the web, how does that matter??
Don't think i'm biased. I'd been using Pel long before I discovered PHP, and there's nothing better than perl to hack up a quick script to do something, but PHP has its own place.
Arun
Raju Mathur <[EMAIL PROTECTED]>wrote:
Just some thoughts I'd put together for a friend. Feel free to flame
:-)
-- Raju
Why I prefer Perl
or
PHP sucks
1. PHP is not a general-purpose programming language. No matter how
hard the creators of PHP try to make it one, it started out as an
embedded web-programming language and continues to offer the richest
set of features for that specific purpose. Attempts to make it
general purpose so far are not useful enough to be taken seriously.
How does this affect you? If you write a major app in PHP you cannot
use it in any paradigm except a web-based one. You may argue, `the
web is where it's at, and I don't envisage any changes to my app' but
that's narrow-minded and limited thinking. Good apps evolve over time
into things that their creators did not and could not have imagined.
Do you want to send your baby out into the wor! ld with the millstone of
this limitation hanging about its neck from day one?
2. (Corollary to Point 1) PHP doesn't support any mode of programming
except embedded into HTML. This makes it impossible to, for example,
adapt a PHP app to models such as SOAP, thin client, etc. Embedded
into HTML is fine for low-end stuff. When you're dealing with larger
or more complex apps, the distribution of logic in your PHP apps makes
it impossible to administer, maintain and enhance them. If I have to
scan the source of 200 HTML pages to figure out exactly which fields
in a database get updated when the user fills out a form, I lose, the
user loses, the developer of the app loses.
3. Unlike Perl, PHP doesn't have vast repositories of library modules
available for easy download. PHP developers are more or less stuck
with the modules and functionality that the makers of PHP build into
the language. While there's no denying that this function! ality is
very impressive, it is by definition limited.
4. PHP isn't an object-oriented programming language. OOP is a
much-misused paradigm nowadays -- every programmer with 6 months of
programming in Java calls him/herself an OO programmer. However,
there's no denying that appropriate and sane use of OO can make
programs that are much easier to maintain and enhance and share code
from than programs using a purely functional interface. While PHP
does have classes, it doesn't support some critical features of OO
like multiple inheritance.
5. PHP promotes insecure programming. I would not say that PHP is an
insecure language; however PHP encourages people with little or no
programming experience to get in and start writing without
understanding the ramifications of their actions. Giving power
indiscriminately can be dangerous and the huge number of PHP exploits
that are revealed each day in the security community prove the a! dage.
Further, PHP doesn't support secure programming features like taint
checking in Perl.
6. PHP is not as efficient as Perl. This doesn't matter for smaller
projects, but where there's large amounts of data to be processed the
speed factor can become a significant criterion for determining the
choice of a programming language.
7. Perl supports the same paradigm (embedded into HTML) as PHP does
if you really need it, along with many enhancements like
tamplate-based web page creation.
================================================
To unsubscribe, send email to [EMAIL PROTECTED] with unsubscribe in subject header. Check archives at http://www.mail-archive.com/ilugd%40wpaa.org
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes