Hacker News new | ask | show | jobs
by zred 5129 days ago
1. The same is true of share-nothing architectures in Ruby, Python, Perl, Java, or C# (including Rails and Django). All you have to do is get more app servers - no fuss. Of course, the hard thing is scaling the data store which is something PHP (or other language) users will still face.

2. I don't think PHP is any easier than Python or Ruby - in fact, in many ways I consider it more difficult personally. There may be a higher number of people that advertise PHP skills, but many of them are people that can cut and paste and keep futzing until something mostly works in WordPress. That's not really the kind of programmer you want (at any price).

3. PHP has some nice built-ins for the web - including session/cookie handling, the $_GET and $_POST hashes, etc. However, when I use Python, Ruby, or Java, I get these things via a framework (even a microframework). Yes, one of PHP's strengths is that it includes a microframework that handles basic routing, session handling, and request information. However, all of that is available in other languages.

4. Whether it's Django, Rails, or another framework, I find that an error in one request doesn't propagate to the next. It's interesting how the author hedges and says, "well, when it does get borked, it's your fault rather than PHP's". So, PHP never fails for more than one request, unless it does in which case it's your fault. That's hard to argue against since it doesn't mean anything.

5. None of PHP's frameworks seem as mature as those available in Python, Ruby, C#, and Java and I think part of it is due to the fact that PHP is by itself a microframework.

6. PHP.net does have great docs and they're all nicely in a prominent location. However, one really needs better docs to compensate for poor design. For example, when dealing with PHP strings, do you put the needle or the haystack first? The answer is that it depends on the function. preg_match is needle first, strstr is haystack first. That brings up another inconsistency: should words be separated by an underscore? The answer is again that it depends. Every language has its warts, but PHP is known for being inconsistent.

7. PHP does have a bunch written about it, but it also has a lot of noise. There's a lot written by people who don't quite know what they're doing, but were able to cut and paste code and futz until it worked.

8. The same could be said of almost any community. It's easy to say that there's always people to help since it can't be quantified or argued against.

9. PHP does have good support for many things, but it lacks a modules system. Python has PyPI, Ruby has RubyGems, Java has Maven, and Perl has CPAN. PHP does support a lot of things, but you've provided no evidence that it supports more things than any other language (MongoDB, Pusher, and memcached are supported in many languages and those are the only things you used as examples).

10. Many languages are dynamically typed, but PHP is also weakly typed. Sometimes this is fine, but it can also be a pain and introduce subtle bugs from implicit type casting.

11. I think that many of us have chosen other languages because we believe we get things done faster in them. Writing an application isn't just getting the proof of concept out the door. It's about long-term productivity.

If you like PHP, great for you! I hope you're productive and enjoy using it. However, none of these reasons really ring as valid. PHP is not more scalable. PHP includes a microframework that you don't have to choose beyond the language, but that's not really something that interesting given that frameworks exist for most languages. Via a library, most languages have as good support for the web as PHP has - sometimes better (in my opinion). And the idea that PHP's popularity on the low end makes it an attractive option just seems like a bad argument.

Finally, the author says that PHP is where it's at for the web for the next 5 years (at least). However, what is launching around now and using PHP? Instagram was Python (Django). Quora wasn't PHP. FriendFeed was Python and Facebook seems to have moved away from PHP except for its legacy front-end. Google, Microsoft, and Apple don't use PHP. Pinterest is Python and Django. Twitter is a mix of Ruby and Scala. Github is Rails, BitBucket is Django. Groupon is Rails. Again, just because someone else is doing something isn't a reason to do it. However, if the author is arguing that PHP is the language of the next 5 years, I'd argue that it isn't the language of today.

When Facebook launched, Rails and Django didn't exist; .NET MVC didn't exist; Play! didn't exist. In some ways, Facebook seems to be the last big pre-Rails site. That doesn't mean that newer sites always use frameworks (or that some frameworks didn't exist before then). However, new and popular frameworks burst onto the scene in 2004 and 2005. It changed our web development community. Since that time, I think we've seen new projects using other languages a lot more than PHP. Again, I can't emphasize enough that just because someone is doing something doesn't make it good for you. However, if the author is going to claim that PHP is the language of the day, I'm going to refute it. That doesn't mean that you can't build good things with PHP, but I think that a lot of us are using other tools.