Skip to content

Comment on Having real trouble hiring coders...parent

Comments

"There's nothing wrong with PHP as a tool"

I think there are some things wrong with it, actually. Probably you can write good code with it, but I don't think it is encouraged, and it is very easy to screw up.

Probably you can write good code with it, but I don't think it is encouraged, and it is very easy to screw up.

I don't think so. PHP just doesn't have the right abstractions needed to create truly good code. Having some OO support is better than having none at all, but it's clear that the authors of PHP never bothered to try any object system other than Java's -- easily the worst object system of any language. (Also, I would love to know why a language with no type checking has Java-style interfaces. What is the point?)

Combine that with the lack of anonymous functions, closures, continuations, lexically-scoped variables, and so on, and you are stuck compromising your design to get something that is actually implementable. It is sort of like a brilliant novelist that is used to writing with his laptop, but is given some napkins and a dull pencil instead. Since he's a great author, he'll probably make something good -- but just give him his laptop back already.

I was trying to be diplomatic - actually I personally despise PHP, but I acknowledge that some pretty big sites have been built with it. Also, it still seems to be the most productive language, which is odd, given it's crappyness. Try to find a popular blogging system or CMS that is not written in PHP (I know there are some, but somehow the PHP ones always have more traction).

That's because PHP is installed on a huge number of web servers out of the box, and thus at the disposal of nearly any Joe Blow who uses shared hosting.

PHP has done one thing right in it's history; they made it extremely easy to deploy.

blog software: Moveable Type, LiveJournal. CMS software: WebGUI and many sites like Vox, TypePad, Slashdot, ...

As a tool for very specific projects - projects which are generally web projects that will never go beyond a front-end layer and require much complexity in the backend pieces. However you have to know in advance that you are writing a project that is specifically like that - or you can write zend extensions in C or use something like Thrift to talk to non-PHP back-end pieces.

(My own preference is not to use PHP whenever possible for personal projects - but I run my own servers and am fairly familiar with mod_perl, FastCGI and Apache internals).

AboutSource Built by g1lg1l

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