Thursday, July 23. 2009Why I love PHPTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Now let's hope a butterfly in Nepal farts, due to which a thunderstorm in Peru creates a hurricane in Japan, which causes a volcano in Indonesia to erupt and eject so much matter in the air that the sun is blocked for a few days, which causes a specific European Swallow to drop a coconut on your head causing your grievous pain.
I have only two questions: What did you smoke and have you still got any of that?
Now let's hope a butterfly's wings in Nepal move, due to which a thunderstorm in Peru creates a hurricane in Japan, which causes a volcano in Indonesia to erupt and eject so much matter in the air that the sun is blocked for a few days, which causes a specific European Swallow to drop a coconut on your head causing your grievous pain.
The problem with code such as the one you're showcasing there is that even though I'm quite familiar with all the syntaxes you're utilizing, the code is still so complex that it took me several minutes to wrap my head around it.
When you can't instantly understand what a line of code does, it's not cleverness but obfuscation. The time and effort spent reading code should be limited to understanding why a line of code does what it does. Of course, I realize that you know all this, but some part of my psyche still required me to do some complaining. And yet you can't do new foo()->bar(). Or access an array indice of the same line as you declared it. I've found that in most instances where it really matters, PHP is a lot more limited than other languages, including some with static typing. As in so many other case, the dynamics of the PHP language isn't consistent. That's a bit sad.
I must admit that this example was already hard to understand a few minutes after its creation. And yes, I know the value of simple and readable code, maybe I should add a sticker at the top of this page that says Kids, don't do this at home, work or somewhere else
By the way, you can even simplify the last two lines, so that you don't need two statements to invoke method bar(). ${$${'v'} = new ${(string) new ${$v = 'v'}}}->{(string) new m}(); Greetings Manuel
I will use that example in all my future projects, other developers will love me for it. Reminds me of Brainf*ck
On a more serious note, I think an underscore either side of METHOD has been turned into an underline.
Yes please use it wherever you can </kidding>
By the way, thanks for the magic constant underscore hint.
Great. If you want someone to start hating php, give him this example. Some coders hate simple object patterns not this abstaction
I like it.
I feel so dirty now :-/
I wonder if they put this in the new ZCE exam.
Looks sick to me.
I always hated perl for its 'lets have millions ways to do the same thing, and code it all in one line that no man would ever understand'.
compare with Python rule:
There is one and only one obvious way to do a thing. And you'll understand why php sucks, and why it's huge trash (hint: take a look at function naming at least). Because there are million ways to do things wrong and people use all of them. Now it will be even worse with goto.
That is awesome, trying to follow it I made it all the way to the initialization of class "c" - only to realize that there is not class "c" and it is just a reference to "f".
Lol, that's great!
I think i'll try this in my next exam. |
ProjectsFurther stuffCategories |

