Re:PHP: a fractal of bad design (2012)
by toni on Saturday June 07, 2014 @07:01AM
(#7861802)
I am sorry but this is one of those posts (from 2012, no less) that should be killed by dang because it only instigates a black hole of useless discussions and adds absolutely no value. Do yourself a favor, save your brain cells, do whatever you think is productive and nice this weekend. Sometimes it's better to just ignore trolls.
Re:PHP: a fractal of bad design (2012)
by DoubleMalt on Saturday June 07, 2014 @07:02AM
(#7861805)
There is one major reason why PHP is so popular:
The step from HTML only to a slightly enhanced webpage with dynamic elements is easier than with any other language (JS included).
Combine that with the simplicity of mod_apache (that is available on almost every web host) and it is the easiest way into programming.
Create a mod_[ruby|python] that just evaluates ERB/Jinja templates and is as simple to integrate into apache and you might be able to do something good.
Re:PHP: a fractal of bad design (2012)
by aruggirello on Saturday June 07, 2014 @07:07AM
(#7861814)
It's strange that, given how badly designed PHP really is, it's so surprisingly flexible that things like my PHP preprocessor can exist:
https://news.ycombinator.com/item?id=7861616
I'm sure you could write a shorter, (maybe) faster, cleaner preprocessor for Python, Java or Erlang, but I'm not sure it would be a viable solution, there. With PHP, I got this 'mostly unused hash comments' thing readily available, like a low-hanging fruit. And then, there was token_get_all() - the squeezer...
Re:PHP: a fractal of bad design (2012)
by joesmo on Saturday June 07, 2014 @09:59AM
(#7862107)
At least half of these things are either examples of good design or neutral. That said, there isn't a single language for which I wouldn't be able to produce a laundry list of "bad design" that's equally as long and disturbing as this one.
Insulting PHP developers and their work is certainly not the best way to "hurt" people's "opinion of PHP." It's a great way to come off as a pompous asshole, however.
Re:PHP: a fractal of bad design (2012)
by iamben on Saturday June 07, 2014 @07:24AM
(#7861840)
Someone new to something isn't usually looking for negatives - they just want to find out how to get something done and go and solve a problem / make something.
Re:PHP: a fractal of bad design (2012)
by mathenk2 on Saturday June 07, 2014 @01:32PM
(#7862550)
This is an out of date article that doesn't have much value any more -- many of the points seem to be bad practices anyhow. Like most languages, if you never learn it in depth, all you see are the warts. This same article could be written for nearly every other language; how many "This Language Sucks, and Here's Why" articles are going to keep popping up?! Please kill this.
Re:PHP: a fractal of bad design (2012)
by Kudos on Saturday June 07, 2014 @06:55AM
(#7861793)
I couldn't get past the paragraph analogy. I'm sure they thought it was clever, but actually it was unnecessary, inaccurate (as all analogies tend to be) and portrays the person the article should be targeting as a dumbass.
Re:PHP: a fractal of bad design (2012)
by Kudos on Saturday June 07, 2014 @07:02AM
(#7861806)
I doubt everyone who has to use PHP at work wants to be doing it, some of them are forced to by their circumstances. How else do you think these sorts of articles come to be?
The step from HTML only to a slightly enhanced webpage with dynamic elements is easier than with any other language (JS included).
Combine that with the simplicity of mod_apache (that is available on almost every web host) and it is the easiest way into programming.
Create a mod_[ruby|python] that just evaluates ERB/Jinja templates and is as simple to integrate into apache and you might be able to do something good.
I'm sure you could write a shorter, (maybe) faster, cleaner preprocessor for Python, Java or Erlang, but I'm not sure it would be a viable solution, there. With PHP, I got this 'mostly unused hash comments' thing readily available, like a low-hanging fruit. And then, there was token_get_all() - the squeezer...
Insulting PHP developers and their work is certainly not the best way to "hurt" people's "opinion of PHP." It's a great way to come off as a pompous asshole, however.
How long would the list of problems be for any other non-statically typed language? Like for example, Javascript?
At least it would prepare them for what is to come.
Let other people make their own choices, no need to rant about a language you dislike to try and convince them to not use it.
PHP is badly conceived, we all know that, get over it !
Nobody is forcing people to use it.