Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

51–60 of 160 posts

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

#52
post #2

Don't want to be inflamatory, but: PHP has already been replaced by Ruby/Rails as the good thing that should be used for new projects. Only PHP developers don't see that. You lost me when you tried to argue that ORMs are not useful. Its easy to see why PHP developers think that, though.

As a Python developer in SF, I can 100% agree with this. Ruby/Rails has replaced PHP for almost the entirety of new projects going forward out here — at least with the developers I know and respect — and Python makes up the rest.

So by looking at a tiny subset of programmers (those that you respect), of a tiny subset of programmers (those that you know), of a tiny subset of programmers (those in SF), you feel you can say something representative about programmers and programming as a whole.

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

#53
post #47
post #42

PHP is not the devil. It has some funky design decisions, but oh well. Mixing HTML, SQL and logic is the devil. The problem is that PHP makes it too easy to do (some would say it encourages it).

PHP is not that bad? What other popular language is worse?

Lua and JS both come to mind. Neither of them are worse than PHP, but they're right around that same level of (un)usability and number of pitfalls.

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

#54
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…

Show me a website where php is the source of the performance problems and I will show you a website php allowed to reach success/a large audience.

Frankly, unless you are very large scale php is never your bottlenecks, I/O is. And if php become your bottlenecks, you have already won.

(of course you could find exemples of math-heavy calculating sites where this isn't true, but that just means you don't know how to pick the right tool for the job)

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

#55
post #20

Earlier quoted context omitted.

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

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.

semi-colon

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

#56
OMG, Julius Caesar had to die too!

There is no need for any language or framework to "die".

If you do not like PHP (or Perl or Python or COBOL or Ruby or Java) just do not use it. There are plenty of alternatives.

If you and your team can be productive with any of these languages, go for it. PHP with modern OO-frameworks, like Yii, can support rapid development of complex web apps just fine. Facebook runs just fine on PHP even without any 3rd party frameworks. The proof is in the development and deployment. The only way you can "kill" a language with so much support is to offer something 10x better or create some exclusive tie-in. Where is that magic offering?

Vote with your feet and dollars and just take it easy. There is no need to fight the imagined oppression.

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

#57
post #20

Earlier quoted context omitted.

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

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.

ASP?

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

#58
I really really think this is asking the wrong question. Sure PHP beat perl at its own game, and really was the master of the CGI style web. But the thing is, that really isn't where the world is anymore. Sure, there is a place for building pages from templates, particularly in piecing together custom splash pages and whatnot, or xml feeds, but honestly, the CGI style web is just going away.

Look at what everyone is doing right now: make an app in javascript+html5+css, serve those static files, and feed the app with json. Save bandwidth, scale easier, and just have better control of the display by manipulating the display directly.

tl;dr - Nothing will replace PHP, because no one is making tools for that case (file-oriented-web) anymore.

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

#59

One word: deployment To me, the best thing about PHP is that it is so easy to deploy to pretty much any shared hosting on the planet, not to mention really easy to set up on your local machine (with WAMP/MAMP). I love Rails, but on many occasions have built projects in PHP (using a decent framework like Kohana) just because I was putting this on my client's shared hosting account and didn't want to deal with having t…

While I don't agree that it's good. It is definitely a huge reason why beginners love PHP. For learning how to code you can't beat how easy it is to put PHP on a server.

Also things like, file_get_contents() is stupid simple. It's often abused but you can put anything in that and get something back. Even a URL. Who care's if every once in a while you get a 500, or 404. Most of the time it works just fine.

PHP is going to be really hard to replace. I think your better off looking to graduate PHP developers to something else.

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

#60
I've come to expect hackery from this guys blog.

The truth is that for professional, skilled developers, mastering their Nth language is an increasingly smaller investment compared to their first.

But for people north of HTML coders and south of professionals, they have a lot invested in the scripting skills they've developed and nobody is interested in seeing the value of their investment diminish for a reason like this.

People here always tout PHP's installed-base as a big "plus" for the language. But I think more than that is the mindshare.

Post reply on HN