Live data from Hacker News

Taking PHP Seriously (2016)

slack.engineering

41–50 of 150 posts

Re: Taking PHP Seriously (2016)

#42
post #30

Earlier quoted context omitted.

FTA: "I claim that PHP’s simpler “think; edit; reload the page” cycle makes developers more productive. I agree wholeheartedly with this. I prefer statically-typed languages w/ a bit of local inference (I end up in java usually, but C# got it right) and I consistently see people in my world underestimate the edit/reload workflow. Even a small compilation step is enough to break flow and make development a chore, once…

It’s hard for me to relate, because I just don’t see “edit; reload” as being that important. I think the difference is I write tests. I usually code everything while writing/running tests. Then it always works the first time I run it, so there’s no need for “edit; reload”.

I really like working in PHP but I'd actually agree that edit;reload is a virtue of the language (in the environment everyone normally assumes it's running in) that is losing value.

This virtue was incredibly valuable to me when I was throwing a website together with ducttape and bubble gum and it was the only way (that I knew of) to be able to clearly and quickly see the results of my changes. With tests in the picture I think it loses a lot of that value - it still has some since nobody likes writing front-end tests but most of your code changes should be "proven" by some level of automated test coverage.

Re: Taking PHP Seriously (2016)

#43
post #33
post #6

So the entire argument is that PHP is single threaded and each request starts with no state? Am I missing anything else? I’m trying so hard not to rant here, so I just wanted to confirm that those are the only positives he outlines about the language.

> I’m trying so hard not to rant here Not that hard, there's a bias showing. First, those things you've mentioned are nothing to sneer at, are actual very good decisions (even if accidental) for a webserver-centric language. They enable even naive developers to achive good scalability and isolation, and make fast development/debug cycles trivial. Second, PHP has been improved by leaps and bounds from the days of 4, t…

> PHP has been improved by leaps and bounds from the days of 4, to the point of being a totally different language.

No, most of bad parts are still here, all the stdlib inconsistancies and co are still here. Just because add more functions to a language doesn't change the bad design decisions at its core. The weird mix between dynamic typing and Java style rigidity (without most of its benefits) didn't go away.

What makes it a different language since PHP 5? more type guards? no, it's still a templating language.

Re: Taking PHP Seriously (2016)

#44
post #26
post #18

The best language for a startup is one the founders know the best. Every other discussion will at best make a 1% difference.

Close I think - the best language to use is the one you will have the easiest time hiring good talent for. If you found a startup and all really love and are fluent in COBOL that's great but... good luck when it comes time to hire another employee.

This is strange to me because I’ve taken and succeeded at two positions now where I didn’t know the language going in.

Re: Taking PHP Seriously (2016)

#45
post #30

Earlier quoted context omitted.

FTA: "I claim that PHP’s simpler “think; edit; reload the page” cycle makes developers more productive. I agree wholeheartedly with this. I prefer statically-typed languages w/ a bit of local inference (I end up in java usually, but C# got it right) and I consistently see people in my world underestimate the edit/reload workflow. Even a small compilation step is enough to break flow and make development a chore, once…

It’s hard for me to relate, because I just don’t see “edit; reload” as being that important. I think the difference is I write tests. I usually code everything while writing/running tests. Then it always works the first time I run it, so there’s no need for “edit; reload”.

Oh, you were asking about benefits that you can easily relate to.

Well, in that case then you'd be in a much better position to answer than I am.

Re: Taking PHP Seriously (2016)

#48
post #26
post #18

The best language for a startup is one the founders know the best. Every other discussion will at best make a 1% difference.

Close I think - the best language to use is the one you will have the easiest time hiring good talent for. If you found a startup and all really love and are fluent in COBOL that's great but... good luck when it comes time to hire another employee.

That's making a bold assumption you get as far as hiring.

Re: Taking PHP Seriously (2016)

#49
post #33

Earlier quoted context omitted.

> I’m trying so hard not to rant here Not that hard, there's a bias showing. First, those things you've mentioned are nothing to sneer at, are actual very good decisions (even if accidental) for a webserver-centric language. They enable even naive developers to achive good scalability and isolation, and make fast development/debug cycles trivial. Second, PHP has been improved by leaps and bounds from the days of 4, t…

> PHP has been improved by leaps and bounds from the days of 4, to the point of being a totally different language. No, most of bad parts are still here, all the stdlib inconsistancies and co are still here. Just because add more functions to a language doesn't change the bad design decisions at its core. The weird mix between dynamic typing and Java style rigidity (without most of its benefits) didn't go away. What…

Those strange naming choices definitely still have a cost but a lot of effort has been invested in documentation and alternatives to lessen their cost.

The mixed typing is... honestly, it's amazing. You really need to try it out for yourself in PHP7 or 8 - you can lean on really strict type checking in your application, go the old route or generally adhere to strict typing and relax that for entry points and library calls.

Lastly, PHP has come down hard and actually introduced backwards compatibility in a few key places to address some of the biggest WATs, I've been pretty impressed by the balance of the language stewardship.

It does definitely have warts, but there are warts on everything that people actually use in industry.

Re: Taking PHP Seriously (2016)

#50

Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.

Forum share, maybe, but it's been and remains an extremely popular language.
Post reply on HN