Re:Ask HN: How will it impact my webapp if it is written in ...
by stevenwei on Wednesday July 07, 2010 @03:50AM
(#1493658)
Agreed. Even if these two pieces of code might accomplish the same thing, at least the Python version doesn't make me want to stab myself in face whenever I write it:
object.method_name(arg1,arg2,arg3)
(Python's *args and **kwargs are especially useful in these types of situations.)
Although PHP is slowly adding useful modern language features (lambdas, closures), some of the syntax really is terrible. I honestly can't imagine anyone preferring the former to the latter, at least in this example.
Invoking an object callback in PHP:
Invoking an object callback in Python: Although PHP is slowly adding useful modern language features (lambdas, closures), some of the syntax really is terrible. I honestly can't imagine anyone preferring the former to the latter, at least in this example.