PHP: a fractal of bad design

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

So, so true:
http://me.veekun.com/blog/2012/04/09/ph ... ad-design/

I love this quote:
Quote:
I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.

You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.

You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.

You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.

And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.

Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.

That’s what’s wrong with PHP.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

A good number of those points are about things that are already fixed. Some of it is opinion based and can't be taken as a negative to the language... unless you are of the same opinion.

But the rest are facts and I agree with most of his points against PHP. Some of the stuff he is pointing out I don't understand (making me learn stuff) and some other stuff are just griping.

Quote:
PHP’s one unique operator is @ (actually borrowed from DOS), which silences errors.

I don't understand how this is bad? If PHP has it, it doesn't require you to use it... maybe I just don't get the point of that line there.

I've always wanted to learn C++, Basic, Java, Perl and Python, but I'm a bit lazy... PHP has it's faults... A LOT of them.

Quote:
Appending to an array is done with $foo[] = $bar.

I think he is griping about the syntax here... and if so, that's purely opinion grown from hatred to PHP. There will always be differences with syntax between 2+ programming languages (Though PHP may be (pseudo/semi)-programming language.

But there are good points there against PHP (mixed in there somewhere with all those opinions).
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

My main grip with PHP is that it's a poorly-designed, hacked-together language that attracts bad developers. The multitude of flaws in the language lead to bad, buggy applications written by people who don't know any better.

Also, I'm not sure what you mean by PHP being a pseudo language. Last time I checked, it's still a language.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

spork wrote:
My main grip with PHP is that it's a poorly-designed, hacked-together language that attracts bad developers. The multitude of flaws in the language lead to bad, buggy applications written by people who don't know any better.

Also, I'm not sure what you mean by PHP being a pseudo language. Last time I checked, it's still a language.

What I mean by PHP being a pseudo language (don't know if it's actually a term in the programming world as I'm a "bad developer")is that it's a "poorly-designed, hacked-together language that attracts bad developers"... unlike a "real language" like Java
  • weldan
  • Newbie
  • Newbie
  • User avatar
  • Posts: 8
  • Loc: Malaysia

Post 3+ Months Ago

i am more interested of how to get things work in any language as possible.

language war is so 99.
  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

Relevant:
http://www.reddit.com/r/lolphp
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

I'm a little confused. I came back to that article and checked it out again and came across the following statement in there:

Quote:
In a similar vein, array_rand has the strange behavior of selecting random keys, which is not that helpful for the most common case of needing to pick from a list of choices.

array_rand
Quote:
array_rand — Pick one or more random entries out of an array



I'm not sure I understand what he is griping/complaining about this function.

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.