PHP vs Perl (Put on flame proof gear)
dave at thesmithfam.org
Sat Mar 18 16:12:14 MST 2006
Ross Werner wrote:
> A bigger difference I think is the functional aspects of Perl (like
> map() or grep()) which, AFAIK, have no real counterpart in PHP.
Check out PHP's array_walk() and array_search() for arrays at least.
Perl's grep() and map() are more special though, since they don't seem
to behave like normal Perl functions (whatever "normal" means for Perl).
The more languages I learn, the more I begin to think that language
choice is more of a personal preference than an imperative. Java
programmers are no more likely to fail than Python programmers in my
experience. It's already been stated once, and I agree: Modern language
choice has more to do with the language's community and libraries than
it does with its syntax.
Another point to consider that hasn't been mentioned already is
deployment. I personally program mainly in C++, with some Perl, PHP,
Python, and Bash sprinkled in for diversity. For end-user applications,
C++ is much easier to deploy than all of those languages (Bash excepted,
maybe). Java lacks a static linker (though it can done with genjar),
requires a huge JVM, and depends way too much on strange environment
variables. Python/Perl/PHP require interpreters, and different revisions
(yes, revisions!) of the interpreters provide differing APIs for some
very important functions (like settimeout() in Python's socket, and
different exceptions for the same function).
With C++, I can static link in whatever libraries I want at compile time
(even the C++ standard library itself!). Cross platform support is only
as hard as you make it. Macros are very powerful when used wisely. C++
is great. Don't dog it, Stuart, you old hack! ;)
More information about the PLUG