News for hackers. Stuff that matters.
Re:PHP needs to die. What will replace it? by michaelchisari on Wednesday October 05, 2011 @03:37PM (#3077176)
The article states that php doesn't have lambdas and method chaining, although it does. They aren't well done, as per usual, but it definitely has them.

Honestly, we may be best off doing a CoffeeScript style pre-processor for PHP. Because PHP isn't going anywhere, no mattter how much we may prefer other languages, PHP's popularity is one of pure pragmatism, something the language purists don't seem to understand.

Get me from 0 to "Hello, World" as fast as you can. That's how you build the next PHP.

Re:PHP needs to die. What will replace it? by jmathai on Wednesday October 05, 2011 @03:52PM (#3077234)
>> Get me from 0 to "Hello, World" as fast as you can. That's how you build the next PHP.

Well put.

Re:PHP needs to die. What will replace it? by thrashr888 on Wednesday October 05, 2011 @04:06PM (#3077294)
I can't think of any other languages that let you do `echo 'Hello World' > /Library/WebServer/Documents/index.php` and you already see that in the browser because it comes with your OS. It's hard to beat that for normal folks just starting out making web pages.
Re:PHP needs to die. What will replace it? by corin_ on Wednesday October 05, 2011 @04:30PM (#3077418)
ASP?
Re:PHP needs to die. What will replace it? by mssteuer on Wednesday October 05, 2011 @04:29PM (#3077409)
semi-colon
Re:PHP needs to die. What will replace it? by jinushaun on Wednesday October 05, 2011 @04:21PM (#3077374)
Exactly. To beat PHP, you have to be as easy to write as static HTML. Even though I have done Ruby, Node.js and ASP.NET projects, I still go back to PHP because of how easy it is to go from 0 to hero without all the fuss.

The closest thing I've found is the serve gem, which lets me launch a web server from my current working directory. It lets me quickly mock something up in ERB, Haml and SASS without messing with Rails or Sinatra. As a complete newbie, with no coding experience, PHP is a much easier hill to climb than Rails or Django, which is Mt Everest by comparison.

Re:PHP needs to die. What will replace it? by nolok on Wednesday October 05, 2011 @04:22PM (#3077376)
I agree with you and I think it goes even further than that: get me from hello world to mockup of my final app to my final app. Coding in php isn't pretty, but it's fast, even once you get past that hello world part.

Look at all the questions on stackoverflow from total beginners: they don't understand much of what they are doing yet, but they already have working forms and several pages and, well, results.

Of course, that's also part of what makes people hate php.

Re:PHP needs to die. What will replace it? by MartinCron on Wednesday October 05, 2011 @04:37PM (#3077452)
Get me from 0 to "Hello, World" as fast as you can. That's how you build the next PHP.

I understand why that is, but I can't help but think that it's optimizing for an edge case instead of the whole operation. I'm willing to invest a little bit longer to get to "Hello World" on day one if it means a lot less pain for every day to follow.

Re:PHP needs to die. What will replace it? by InclinedPlane on Wednesday October 05, 2011 @06:10PM (#3077845)
A useful criticism, but in this case I don't think it's optimizing for an edge case. There's a power law, or something close to it, when it comes to web developer skill. PHP is so dominant because it requires very little skill to get started, and very little skill to incrementally advance from there.

Other technologies can try to push on the "PHP problem" from above, and they can make a lot of progress, but they won't ever "win" because the inertia of PHP is coming from below. The only way to fully get rid of PHP is to beat it on its home turf, and that's firmly in the "Hello World" realm.

Re:PHP needs to die. What will replace it? by MartinCron on Thursday October 06, 2011 @04:46PM (#3081574)
I guess it depends on what the goal is. I personally don't care if anything kills or supplants php. Different people can and should use different tools.

When trying to answer the question of "what tools should I, as a serious professional who is in this for the long-term, choose to work with right now?" it's really short-sighted to balance everything on how easy it is to get to "Hello World".

Re:PHP needs to die. What will replace it? by eropple on Wednesday October 05, 2011 @04:59PM (#3077564)
Most of the people using PHP almost certainly disagree with you. (Most of the people who have a clue about PHP, i.e. @fabpot and crew, may not disagree so strenuously, but I would suggest that they are the edge case.)
Re:PHP needs to die. What will replace it? by MartinCron on Thursday October 06, 2011 @04:34PM (#3081527)
Of course the people who don't find php to be painful would disagree in my assessment that php is painful, kind of by definition. :)

Would you choose an operating system based on how easy it was to install, or how pleasant it was to use?

Re:PHP needs to die. What will replace it? by eropple on Friday October 07, 2011 @11:51AM (#3084493)
Sure, but you said that that was "optimizing for the edge case". Your edge case is PHP's base case, y'know?