PHP compared to other languages...
View Single Post
01-18-2008, 02:02 PM
Join Date: Jan 2008
Worse, the whole document is a paragon of arrogance. Comments like this disqualify 98% of their view in my opinion:
But you can't say they are totally wrong, can you?
- I have no experience with PHP introspection so I won't comment on that.
- Lambda function: create_function() *is* a joke. It is essentially a code evaluator. PHP cannot check the syntax during parse time - it performs checking only when the function is created. Furthermore, it makes it hard to bind local variables to the function. In contrast, lambda functions in Python are almost-first-class citizens (I say 'almost' because the Python syntax does not allow one to define multi-line lambda-expressions, but that can be worked around with anonymous function objects instead).
Perl has true support for lambda functions (anonymous subroutines). Ruby has it as well (Proc objects). Heck, even C# has it (anonymous delegates aka closures). PHP's seems to be hacked together.
- Maturity/stability/compatibility: They are right. PHP 4 and 5 changed some pretty large things compared to previous versions, and many apps required porting. So far I've seen less Python programs that break between Python releases than PHP programs that break between PHP releases.
You can embed Python Code in PHP. That is all.
Not that that has a lot of practical use.
The Following User Says Thank You to FooBarWidget For This Useful Post:
View Public Profile
Send a private message to FooBarWidget
Find More Posts by FooBarWidget