Hacker News new | past | comments | ask | show | jobs | submit login

Seriously? Don't get me wrong, I could imagine valid reasons to use PHP. But the quality of the language itself is at the very bottom of that list. I don't usually hear PHP advocates making that case. Usually it's a combination of "the language isn't that bad" and "there are a lot of libraries for PHP".



If you define quality as 'orthogonal naming of functions' and 'elegant constructs' then yes, PHP has its flaws.

But it's been absolutely bullet proof in production for me and when I did find a bug I've had a patch within 24 hours straight from the core devs.

They do take quality serious there, they just don't define it as language elegance.


I'm not sure I understand what your argument is. That there aren't major showstopper bugs that make PHP unusable due to various segfaults? Sure, that's true. But do you mean to suggest that such things exist in greater quantity in other such languages? You say the PHP devs have a sharper focus on quality than other languages; can you provide and kind of evidence for those claims? Not just good response time by the PHP devs, but systemic failures in other languages that go unaddressed, as well?

PHP tends to be at the bottom of the "language quality totem pole" because as a language it's pretty low quality. The PHP interpreter may be fine as a piece of software, but that's a completely separate matter from being a quality language.


I've filed bug reports for other languages and have never so much as received a confirmation, let alone a patch, the php devs responded within a few hours, that shows to me they care.

> PHP tends to be at the bottom of the "language quality totem pole" because as a language it's pretty low quality. The PHP interpreter may be fine as a piece of software, but that's a completely separate matter from being a quality language.

It is specifically for that reason that I broke it down in to two parts, and apparently we agree on the language quality from a design point of view, but from a 'have to use this in production' point of view we do not.

> You say the PHP devs have a sharper focus on quality than other languages;

That's a straw-man, I said no such thing, but it does happen to be my experience that the PHP devs respond very quickly compared to other platforms / languages.

> Can you provide and kind of evidence for those claims?

And no, I'm not going to provide you with any 'evidence' for my claims, you can take my word for it. This is not a court of law, and besides that I never made any claims about other languages before this comment and I don't feel like putting other languages and/or their developers down.

I know PHP as a language has its flaws and that there are some unfortunate choices made in the past that are very hard to undo but that's no reason for losing all objectivity.


> I've filed bug reports for other languages and have never so much as received a confirmation, let alone a patch, the php devs responded within a few hours, that shows to me they care.

It's great that the PHP devs do that! Is that a compelling reason to use the language? I'm not so sure.

>That's a straw-man, I said no such thing;

You said:

> The team that makes PHP makes quality a higher priority than just about any other language

Can you explain to me what I misinterpreted?

> And no, I'm not going to provide you with any 'evidence' for my claims, you can take my word for it. This is not a court of law, and besides that I never made any claims about other languages before this comment and I don't feel like putting other languages and/or their developers down.

It's a little silly to make a comparative statement like "The team that makes PHP makes quality a higher priority than just about any other language" and then refuse to provide examples of where this happens and matters. If you'd just said "The PHP devs respond quickly to bug reports", sure, but when you start saying "They do this better than other languages", you're implicitly already "put other languages and/or their developers down". In a case like that, I don't think it's out of line to ask for examples; if there are major failings in other languages that go ignored and unaddressed, then that's certainly worth some attention. If there aren't, the whole point is moot anyhow. If there are examples of systemic problems that go ignored in other languages, I'd like to know about them - that may matter when I choose a language for a project.

I'm not interested in trashing PHP here; I use it on a daily basis, and get a lot done with it. I also use Ruby, Python, Javascript (both server and clientside), bash, and the occassional perl on a daily basis, and don't have problems with mysterious segfaults and unexplained crashes from 2-year-old bugs that would somehow make PHP's lack of such problems a major marketing bulletpoint. I don't understand your position at all, because as far as I can tell, it's "The PHP interpreter is mostly bug-free, and bugs get fixed quickly" (which is great!), but...what language with showstopper bugs survives mainstream use?


> You said:

>> The team that makes PHP makes quality a higher priority than just about any other language

> Can you explain to me what I misinterpreted?

Yes, that that was terra_t, not me making that claim.


Doh. Egg all over my face. My apologies!


np. Glad we got that cleared up :)


This is why I love HN.


Fundamentally, PHP has an entirely separate address space for each web request... This is a much more "robust" (reliable as opposed to "featureful") approach to web development because there are no data structures in RAM that are shared concurrently between requests.

For example, in ASP.NET, I've had a whole team of developers swear up and down that there are no static variables in a particular segment of code that could be the subject of a race condition. Sure enough, I go in there and find one that's hidden away in a very obscure location.

Java has the same problem, as does any environment that exposes threads to the language. Sure, in theory you could do some very nice things by sharing data structures between requests, but practically the whole programming style of PHP encourages people to avoid horrible horrible problems with concurrency, and there are no language features, even in the laboratory that practically make those problems go away.

To take another example, the urldecode function in CPAN has been wrong for 15 years. If you want to write a urldecode that works right, you've got to write your own (possibly using the built-in for a base). Similarly, the URI object in .NET sometimes does incorrect transformations on URIs, and you need to use string URIs if you want to make interoperable semweb systems... PHP has the lowest fraction of 'things that say they work but really don't work' of any web programming languages, and that's the reason why it is so successful. Other languages are "blub" because they don't recognize that it's even possible for things to be this easy.


To be fair, most languages don't start out as a hacked up bunch of perl scripts like PHP did. They have the benefit of a design process, versus PHP's history of I need it to do X .. hack hack hack .. there it now does X. Remember, PHP started out as one dude's quest to have a dynamic webpage. It's not like Ruby or Python where someone sat down and tried to think things all the way through.

So yeah, I don't think any sane PHP advocate is going to get in your face about PHP as a superior language. Because it's obviously not true and it really doesn't matter all that much.


"Quality" of a language, in your definition, doesn't seem to take into account community, support, ease of use, or pervasiveness. PHP is certainly not at the bottom of the list if you include those attributes, and if your goal is to learn a new language those things become very important.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: