Live data from Hacker News

PHP needs to die. What will replace it?

seldo.com

151–160 of 160 posts

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

#151
post #81

Earlier quoted context omitted.

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.

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.)

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?

#152
post #89

Earlier quoted context omitted.

major changes to core server infrastructure approved at large bureaucratic institutions It sounds like you've already lost.

How so? I find out what I have to work with, work within the limitations set, deliver what the client asks for (if I feel it can be done in a reasonable way) and collect my paycheck.

I didn't mean to be so snarky, I was just projecting. I personally don't have the patience to deal with organizations like that anymore. Life is too short and they aren't the only source of paychecks that I can find.

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

#153

Earlier quoted context omitted.

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.

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'…

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?

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

I will argue that ORMs are not useful to the majority of good developers.

The PHP app I am currently saddled with generates anywhere from 100 (absolute minimum) to 40,000 MySQL queries on every single page view thanks to a developer who didn't know what ORMs are for and was clearly behind the curve when it came to architecting scalable applications.

I have never seen a PHP application abuse a database connection so thoroughly in my life. If he had just stuck to a nice, lightweight PDO wrapper and been able to craft some decent SQL statements, we wouldn't be rewriting this thing right now.

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

#155
post #110

Earlier quoted context omitted.

But in the coming future it will. All major libraries and frameworks are going to port over to python 3. But we are missing the point here. PHP could need a cleanup from the ground up even if they have to break a lot of stuff this could help the language to evolve.

"But in the coming future it will. All major libraries and frameworks are going to port over to python 3." Don't bet on it. It has been too many a years already, and no dice (or minimal dice)

This was a big topic of discussion at PyconAU this year.

Having listened to several Python core developers as well as core developers of some major web frameworks and libraries, I have no doubt that Python 3 will replace Python 2.

I think the key tipping point will be when the major web frameworks support it.

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

#156
post #155

Earlier quoted context omitted.

"But in the coming future it will. All major libraries and frameworks are going to port over to python 3." Don't bet on it. It has been too many a years already, and no dice (or minimal dice)

This was a big topic of discussion at PyconAU this year. Having listened to several Python core developers as well as core developers of some major web frameworks and libraries, I have no doubt that Python 3 will replace Python 2. I think the key tipping point will be when the major web frameworks support it.

The big one is Django, and the whole port is a mess. There's some minimal work but it's like it hasn't even been started.

The official party line on the delay was the lack of a WSGI spec for P3, but there has already been one for several months now.

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

#157
post #81

Earlier quoted context omitted.

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.)

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?

Sure, but you said that that was "optimizing for the edge case". Your edge case is PHP's base case, y'know?

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

#158
post #84

Earlier quoted context omitted.

No, I'm saying that the stuff built into PHP is weird and inconsistent. I should change it to "sane default library" from "sane API". My current favorite example of this (ignoring the naming scheme for string functions entirely) is that in_array and strpos are functions that perform (almost) the same task, on two different types. They take their arguments in the opposite order. strpos($haystack, $needle) vs in_array(…

If the inconsistencies really bother you, write: function my_in_array($haystack, $needle) { return in_array($needle, $haystack); } or whatever, and be done with it...

So now there are some functions you have to prefix with my_, and others you don't?

You're not really helping your cause here.

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

#159
post #91

Earlier quoted context omitted.

Having not used php for 12 years, I recently accepted a freelance job for a client who had been left in the lurch by his php developer who seemingly abandoned the project because she was out of her depth. I have to say that I was pleasantly surprised by some of the new language features that php has borrowed from elsewhere... eg: closures, anonymous functions, docstrings. IMHO php is held back primarily by messy, inc…

Major PHP versions are the evolutionary jumps for the language. They don't tend to worry as much about backwards-compatibility when going from PHP3 to PHP4 to PHP5. I've read that PHP6 was supposed to take it further and outright remove a lot of deprecated and insecure aspects of the language, but I don't know if or when PHP6 will be released. I agree that they should take things even further and really clean up the…

I would suggest that minor PHP versions often are, too. Significant internal changes between 5.x versions have caused some code to break (and other code to act very differently than it was originally intended to).

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

#160
post #103

PHP is a nightmare, but only once you learn enough about programming or development to understand what you should really be doing, and only once you've seen how other languages do it. After that comes PHP's special flavour of OOP. I'd prefer to call it 'Do Whatever The Fuck You Like Orientated Programming' given the abundance of 'magic methods' and other functions that try really hard to make sure you've got a cheeky…

> It's so loose and care-free that it doesn't care what you do or how you do it. This is precisely why I fell in love with PHP. My first was BASIC, my second was C, my third was Java, but my fourth ... oh god ... like that slutty girl who will let you do absolutely anything. How can you not fall in love with that?

Amen. PHP is for hippies, Java is for squares.
Post reply on HN