Live data from Hacker News

PHP needs a vision

news.php.net

161–170 of 182 posts

Re: PHP needs a vision

#161

Earlier quoted context omitted.

If number of users was equivalent to quality you would be correct. But it isn't. Under your argument, Wal-Mart is a purveyor of family heirlooms.

The number of users is not equivalent to quality. It's an indication of quality. As for quality... No, Wal-Mart isn't a purveyor of items with the qualities of being expensive, extremely limited, and old. Quality is a subjective word, defined by different aspects. Just as I can, with justification, define Apple as a purveyor of low-quality hardware, I can say equally it sells high-quality software.

As you say, quality is defined by a number of factors. I'd say that a good, high-level general purpose programming language should be:

- coherent

- non-verbose

- provide solid high-level abstractions

- safe

- have a solid standard library

- optionally, easy to get started with

Of all these qualities, PHP is geared toward "ease of access" with a sprinkling of non-verbosity, and fails mostly or totally in the other categories. Just like the popularity of the Millenium trilogy does not mean Stieg Larsson can write, the popularity of PHP is more an indication of its low barrier to entry (especially combined with widespread hosting support) than anything else.

Re: PHP needs a vision

#162

Wow. I must say I'm surprised (not in a good way!) by the lack of quality of a number of the comments here. I already knew that PHP isn't the language of choice of cool programmers, but at least they make some sort of informed decision. Some of the comments here ("PHP must die!" and "I use Rails" or "I switched to JavaScipt") really show a lack of understanding about even the most basic concepts of PHP, or programmin…

> But if you want to go beyond a simple CRUD-app, Ruby poses a lot of challenges that can be hard to solve whereas PHP, well, just works.

I write PHP professionally. I like PHP programmers. I'm starting to have a soft spot for PHP. PHP and its standard library are a minefield.

Re: PHP needs a vision

#163
post #158

Earlier quoted context omitted.

I'll accept this argument when PHP starts shipping with sane defaults. It's only quite recently that register globals got turned off in the default config.

Global registers were deprecated in 5.3.0, and completely removed in 5.4.0 http://php.net/manual/en/security.globals.php 5.3.0 is 2 and a half years old.

and many shared hosting providers are still on 5.2, and many crappy old scripts require register_globals on.

Re: PHP needs a vision

#164
post #36
post #33

Earlier quoted context omitted.

> Why keep investing in hopeless tech? Because your codebase relies on it. Death will be hard for any mainstream language (proof: COBOL), especially open source ones. It might find not many new projects are started in it.

So you would upvote an article about "COBOL needs a new vision" on HN?

PHP and COBOL both cannot change vision after so many years, that's my whole point.

Re: PHP needs a vision

#165

PHP is for webdev. That's it. Go outside the bounds of that and it loses its magic. On its own it's great for spitting out a webpage. It's a scripting and templating language in one, which is kind of cool. That said, outside of that to make PHP work on bigger projects you end up with a lot of structure and ceremony that make PHP suck, not quite as much as Java, but it's not amazing. Thiings like testing and testabili…

I can't agree with that. Personally I happen to use PHP not for web development, but almost exclusively for system administration and monitoring (I'm not a web developer). It's very comfortable using PHP in these areas, as: - PHP and many of the PHP extensions are packaged for about every major OS and architecture - a lot of functionality is already shipped with the interpreter (so no additional stuff necessary) - it…

Deployment is "easy" because you just copy a bunch of files, right? Reproducible deployment takes a little more effort, but it's well worth it when the time comes to upgrade a server, or a pipe bursts on top of your existing one.

Python has your other advantages, quite a lot of existing monitoring software, and is a far more pleasant language to program in.

Re: PHP needs a vision

#166
post #158

Earlier quoted context omitted.

I'll accept this argument when PHP starts shipping with sane defaults. It's only quite recently that register globals got turned off in the default config.

Global registers were deprecated in 5.3.0, and completely removed in 5.4.0 http://php.net/manual/en/security.globals.php 5.3.0 is 2 and a half years old.

[deleted]

Re: PHP needs a vision

#167
post #163

Earlier quoted context omitted.

Global registers were deprecated in 5.3.0, and completely removed in 5.4.0 http://php.net/manual/en/security.globals.php 5.3.0 is 2 and a half years old.

and many shared hosting providers are still on 5.2, and many crappy old scripts require register_globals on.

I'm not sure what you're saying here. Are you faulting PHP for versions that are nearly 3 years old?

Would you find it a fair comparison if I talked about how bad Rails (framework) is if I was talking about a version that was 3 years old?

Every language has its share of horrible programmers. PHP simply makes it easy for those horrible programmers to flourish. Making it easy does not mean the language itself is bad, because when you're ready to stop being horrible, the language is willing and ready to get you out of the muck.

Re: PHP needs a vision

#168
post #143
post #81

Earlier quoted context omitted.

Why is it a crappy tool for non web stuff? It has an absurdly large set of included tools and having all of that in one place is really handy. More concretely- what's an easy non-web task that Ruby (as you suggest learning) is great at that PHP can't handle just as easily? Not trolling here, I'm genuinely curious.

Several reasons: * The bindings for making anything GUI-ish lack. Horribly. I doubt there is one application like an editor written in PHP; that is actually used. * Its long-threads are ... lacking; You cannot write anything deamon-ish in PHP. * Memory management, as Ramus puts it, is not a concern "I just restart Apache". That makes it unusable for anything bigger then a small CLI-tool. * The Cli-libraries are decen…

Check out Phabricator, it has daemons that are very well managed and cli tools that are fully featured. Arguing that it's unusable for something large is just wrong. The way you manage memory in PHP is the same you way you manage it in any other language; you write /good/ code.

Re: PHP needs a vision

#169
post #163

Earlier quoted context omitted.

Global registers were deprecated in 5.3.0, and completely removed in 5.4.0 http://php.net/manual/en/security.globals.php 5.3.0 is 2 and a half years old.

and many shared hosting providers are still on 5.2, and many crappy old scripts require register_globals on.

And that's PHP's fault? It won't affect you if you start writing a PHP 5.3 (or even 5.4) app today.

Re: PHP needs a vision

#170
post #163

Earlier quoted context omitted.

and many shared hosting providers are still on 5.2, and many crappy old scripts require register_globals on.

And that's PHP's fault? It won't affect you if you start writing a PHP 5.3 (or even 5.4) app today.

Yes, it is PHP's fault. It's endemic to the general attitude of the PHP team.

"Now just marginally less braindead than every other language" isn't exactly a selling point.

Sure, it used to be worse, but I see zero commitment from PHP to actually make real steps to fixing the situation. A real first step would be to start working on a 6.x release that actually removes the gazillion deprecated-but-still-present-and-thus-used things in the language.

Post reply on HN