Skip to content

Comment on Time for developers to address the chaos of Node.js and NPMparent

Comments

PHP isn't criticized because it has a big and clumsy library. The criticisms for PHP are very clear: https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

It is badly designed.

The fractal blog post will be 6 years old in a couple of weeks. I'm going through it again, and __a lot of it is about the big clumsy library__. Some choice excerpts:

There’s no clear design philosophy. Early PHP was inspired by Perl; the huge stdlib with “out” params is from C; the OO parts are designed like C++ and Java

There's even complaints about PHP 5.2, but PHP 5.4 had just been released a month earlier:

If PHP was compiled with --disable-url-fopen-wrapper, it won’t work. [...] Note that this flag was removed in PHP 5.2.5.
foo()[0] is a syntax error. (Fixed in PHP 5.4.)
PHP errors and PHP exceptions are completely different beasts. They don’t seem to interact at all. (Fixed in PHP 7)
There is no finally construct (Fixed in PHP 5.5)
Methods cannot be named e.g. “list”, because list() is special syntax (Fixed in PHP 7)

I'm going to stop there. Not saying any of it wasn't valid criticism or that some of it doesn't apply to this day. Just that too many people, yourself included, are happy to throw a 6 year old blog post at a language that has continued to evolve since. It's also strange that you say it isn't criticized for a big and clumsy library, because in the link you provided about half of the page is complaints about the library.

I'm going through it again, and __a lot of it is about the big clumsy library__.

And even a lot of that isn't fair because PHP has always integrated C libraries directly; which was a huge strength when it was new. A function like mysql_real_escape_string isn't a PHP function, it's a MySQL function ( https://dev.mysql.com/doc/refman/5.7/en/mysql-real-escape-st... ).

Please stop quoting this article. One third of it was wrong at the time it was written. One third is just opinion. The last third is somewhat valid but a lot of it has been fixed since then.

The author never actually used PHP and just collected a bunch of "facts" from the Internet without even testing some of these things himself.

I mean....you aren't arguing JS is a paradigm of perfect design, are you?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.