Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

71–80 of 160 posts

Re: PHP needs to die. What will replace it?

#71
It is so nice to be addicted to the coolest abstractions of programming languages, considering PHP undeniable lack of elegance and orthogonality just a mess, but I think when there is to get shit done this is not the only quality a programming language should have. PHP has other qualities: trivial to deploy, a set of libraries built-in, dispatch/execution fast enough. So I would love to see PHP improved as a language as replacing it is not so easy at this point. Instead fixing the language should not be so hard, assuming a competent core team.

Re: PHP needs to die. What will replace it?

#72
To replace PHP you need:

1. To be on all shared hosting everywhere. I.e. you need to be really easy to install, and preferably not involve long-running processes that shared hosts might choke on.

2. To be beginner friendly. No requirement of understanding MVC, or running commands in a shell (hi RoR!). Pure instant gratification. Someone's first step into using PHP is likely going to be "I want the current date in the footer of my page", or "I want a random image on my homepage", or something like that. Anything like that you can handle by taking your existing page and dropping a tiny snippet in where you want the change to happen. is a potent thing to someone who has never programmed before.

(Note: For point 2 many of the things serious programmers hate about PHP are actually advantages. All the functions in one big namespace? That's great! A newbie doesn't have to try to understand `.)

It's easy to replace PHP for serious developers. We like advanced features, and care about a sane default libary. We're willing to use complex tools to get a payoff.

It's hard to replace PHP for non-programmers who just want to tweak their static page in notepad, or install a blogging package on their cheapo shared hosting.

To sum up: if you don't address both of these points then you haven't killed PHP. You're competing with Python or Ruby or whatever. PHP will carry right on ignoring you, because you're not addressing its fundamental use case.

Re: PHP needs to die. What will replace it?

#73
post #17

I'm surprised that you didn't mention HipHop, especially if performance is your biggest gripe. It really is the bee's knees and will only get better. I spent a good chunk of my day looking at PHP code and profiling data. Assocs are terrible for performance but it's not a fatal flaw IMO. What people really want are separate "vector", "dict" and "set" types. It also needs a decent standard library to replace dyslexic c…

Does anybody actually use hiphop, besides Facebook?

Re: PHP needs to die. What will replace it?

#75

It's 2011 and people still compare frameworks vs languages. PHP may suck, but oh boy, the author doesn't have his facts right. No method chaining ? really ? Rest assured that I would rather hire a good PHP developer than this guy to code in Ruby.

You're right, both things that the author claimed are lacking are in fact very much available.

PHP >5.3 has lambdas: http://ca3.php.net/manual/en/functions.anonymous.php

PHP >5 can support easy method chaining if you return $this from your method.

Lambdas are not yet common, but method chaining is already easy to find in most well-designed PHP libraries and frameworks.

Re: PHP needs to die. What will replace it?

#76
post #72

To replace PHP you need: 1. To be on all shared hosting everywhere. I.e. you need to be really easy to install, and preferably not involve long-running processes that shared hosts might choke on. 2. To be beginner friendly. No requirement of understanding MVC, or running commands in a shell (hi RoR!). Pure instant gratification. Someone's first step into using PHP is likely going to be "I want the current date in the…

I don't agree that MVC and beginner friendliness are fundamentally incompatible. Nevertheless, if you can't get a "hello world" site set up in a very small number of essentially trivial (and easily memorize-able) steps then that's a big show stopper.

Re: PHP needs to die. What will replace it?

#77
post #72

To replace PHP you need: 1. To be on all shared hosting everywhere. I.e. you need to be really easy to install, and preferably not involve long-running processes that shared hosts might choke on. 2. To be beginner friendly. No requirement of understanding MVC, or running commands in a shell (hi RoR!). Pure instant gratification. Someone's first step into using PHP is likely going to be "I want the current date in the…

Yeah, exactly. This headline could have been written with the same justification in 1999. Yet PHP refuses to die. Clearly us hackers are missing something important.

Re: PHP needs to die. What will replace it?

#78

It's 2011 and people still compare frameworks vs languages. PHP may suck, but oh boy, the author doesn't have his facts right. No method chaining ? really ? Rest assured that I would rather hire a good PHP developer than this guy to code in Ruby.

Even though he "can make Rails run just as fast as PHP, but needs between 2 and 4 times as much hardware to do so"?

Re: PHP needs to die. What will replace it?

#79
post #73
post #17

I'm surprised that you didn't mention HipHop, especially if performance is your biggest gripe. It really is the bee's knees and will only get better. I spent a good chunk of my day looking at PHP code and profiling data. Assocs are terrible for performance but it's not a fatal flaw IMO. What people really want are separate "vector", "dict" and "set" types. It also needs a decent standard library to replace dyslexic c…

Does anybody actually use hiphop, besides Facebook?

You know, I don't know. IIRC some of the larger sites like Wikipedia and WordPress were looking at it. The dev mailing list is pretty quiet. Ah, well.

Re: PHP needs to die. What will replace it?

#80
post #72

To replace PHP you need: 1. To be on all shared hosting everywhere. I.e. you need to be really easy to install, and preferably not involve long-running processes that shared hosts might choke on. 2. To be beginner friendly. No requirement of understanding MVC, or running commands in a shell (hi RoR!). Pure instant gratification. Someone's first step into using PHP is likely going to be "I want the current date in the…

Are you saying that developing an API in PHP is insane?
Post reply on HN