Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

11–20 of 160 posts

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

#11
post #5

I understand why rails continues its ascent but the LAMP framework is still very popular - you can get to hello world on your home computer or free hosting account extremely quickly, that's pretty powerful when your're starting out. Services like codecademy may change that but we're a ways off imo.

[deleted]

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

#12
Why is the article comparing PHP (a language) to RoR (a framework). There's plenty of good PHP frameworks which have emerged over the past few years that take care of the boilerplate code needed for a web app. Symfony 2.0 was a released a few months ago; Fabien Potencier's hard work brings a lot of great patterns and conventions from Java to PHP users.

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

#13
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.

Because all projects are CRUD apps?

You aren't going to convert the masses of php hacks with an opinionated and rapidly changing framework like Rails. These are people who still mix logic with templating and you want them to learn an ORM, Coffeescript, Sass and Moustache?

> You lost me when you tried to argue that ORMs > are not useful. Its easy to see why PHP > developers think that, though.

Really? So the object-relational impedance mismatch problem isn't real? You lost me when you completely ignored the real engineering trade-offs involved in choosing abstraction layers like an ORM. Its easy to see why Ruby developers think that though.

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

#15
COBOL is still alive after more than 50 years. PHP will still be being used in 2050 for government web sites. It wont be getting any respect. but the octogenarians who can still program in it will still be making some pretty change.

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

#16
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.

You're being inflammatory. Rails has nowhere near the install base that PHP has, and furthermore, it's a framework, not a language, so the comparison is unequal. Further, setting up and installing Rails is nowhere near as frictionless as installing, for instance, CodeIgniter. Until that can be said, Rails is not a viable alternative. I'm all for a PHP alternative. I use it because it's ubiquitous, but I have no love…

If installing Rails (or Flask, or whatever) isn't trivial compared to the difficulty of writing the actual code, then either your project is a toy, or your web host needs to get its act together.

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

#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 crap like explode(). And don't get me started on the string libraries and the abuse of preg_* functions.

Lastly, comparing plain PHP to Ruby+Rails isn't fair. I prefer Python myself but even then I need something like webpy or Google's appengine library to make reasonable app.

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

#18
This entire essay seems to be predicated on the frankly weird assumption that if something is part of the language, it's good, but if it's part of a library, it's not — even if the two are indistinguishable. For example:

Code that writes your boilerplate for you is helpful and all, but if your language requires a pile of boilerplate to get anything done, then something is already wrong.

If the same functionality is implemented, the code is being generated somewhere. Ditto with his dismissal of Ruby on Rails because Rails is not built into Ruby like PHP's web app support is.

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

#20

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. Ge…

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

Well put.

Post reply on HN