4 ms·
I don't know. Just today I was crying because I can't pass an object property to a function with proper scoping and that I can't pass an instance method as a cl
by debacle 12y ago
I don't know. Just today I was crying because I can't pass an object property to a function with proper scoping and that I can't pass an instance method as a closure. These are interpreter deficiencies brought about by weak programmers writing a programming language.
Both of these things can be rectified by some gymnastics or call_user_func_array (very slow), but it's something that I could do in JavaScript or C# or almost any other language if I wanted to, but not PHP.
It drives me crazy, and almost every day there are one of these things. I never have to say "I wish JavaScript did $x," unless there's a library I need that I don't have. On the other hand, in PHP there has never been a time that I've had to say "Oh, there's no library for this."
It's a game of tradeoffs, and, for me, bitching about syntax is greatly preferable to having to port a library to another language or start from scratch.