Here's the deal: all languages have downsides. It's called "tradeoffs". Depending on what's important to you, those tradeoffs could be Really Bad.
Take for example my current bread and butter, C++. Because it was designed during a time when people still really cared about speed, a number of design decisions were made for the language (eg, non-virtual by default) that may not make sense today. This is just the tip of the iceberg; I trust I don't need to go on about exceptions or the various things left out of the spec or "left as a decision for the compiler implementers".
Now, I know many of the problems with C++, and I'm willing to admit them. It only seems logical, if you are competent at using a tool, you are familiar with its limitations and will admit to them, and maybe justify them in the context of tradeoffs.
This cannot be said of many who defend PHP. I'm not going to rehash criticisms of PHP, but it seems to me that the shortcomings of the language can't be justified by tradeoffs because there were no benefits gained by the downsides that are in PHP. It really seems like an ad-hoc spaghetti mess. That many defend this by citing irrelevant facts ("it's popular!") or debatable facts ("it's easy!") while not addressing the shortcomings at all, tends to lead me to believe that defenders of PHP are lacking in professionalism and probably have little experience of other programming languages.
That articles like this one keep coming up is a sign that people (mainly PHP defenders) can't just admit their language has downsides like everyone else's (okay, maybe more than everyone else's) and move on.
>> but it seems to me that the shortcomings of the language can't be justified by tradeoffs because there were no benefits gained by the downsides that are in PHP
You are wrong. There are a lot of justifications for the tradeoffs, and if you want to know what they are, just ask real developers who wrote the code or maintain it. Somehow this is very rarely done, people just assume because they saw a couple of pages of bad PHP code, they know everything about the language now and can tell if certain tradeoffs were justified or not. PHP is simple, but it's not that simple.
>> debatable facts ("it's easy!")
Calling the fact "debatable" in order to make a proven fact seem dubious may be effective at first, but only if the readers do not have a habit to think about what they read. I think most of the people here do have this habit. So it would be nice to respect the audience and if you mean to dispute known facts - fine, dispute them. By using proof and argument, not just by attaching an epithet to them.
>> That articles like this one keep coming up is a sign that people (mainly PHP defenders) can't just admit their language has downsides like everyone else's
Sorry, this is baloney. Everybody admits that. What PHP defenders would not admit is exactly what you are saying above - that PHP is unique among languages not in having downsides, but in all of these downsides having no justifications at all. What they don't admit is that anybody who sees that is stupid (or, as you prefer to say, "lacking in professionalism") just because they see more than you see. That's just nonsense and there's absolutely no reason to "admit" it.
There are only two types of languages, those that people complain about and those no-one uses.
Given that my own personal favorite has been described as "a DSL for changing large blocks of XML into stack traces" and I laugh at this, I think you'd be hard-pressed to objectively evaluate "more than anyone else's."
"The trick to being a great programmer is to learn as much as you can about as many programming languages and techniques as you can."
I'm not sure I believe this claim. First off how much learning is required to subjectively solve problems in the most elegant way. Syntactically languages are essentially the same. Its the vast API's and language paradigms that need to be consumed and understood at a deep level in order to solve problems in the most elegant way with that "tool."
Now another facet of this argument is what it means to support and maintain everything. A homogeneous system is far easier to support and maintain. Stemming from your argument, a concern would be a mishmash of solutions to support and maintain. If devs were allowed to "use the best tool for the job" for every problem, I would hate to see what their production environment looks like.
The comparison of languages to a hammer is specious. A language is a language like french or italian. A tool for expressing yourself. You can translate word for word which sounds silly, or you can really "know" the language and translate concepts into the paradigms of the other language.
In an ideal world, in which any one language can be used for all tasks, I'd agree. In practice, however, practically every complex system I know of uses multiple technologies. I don't think there's a way around that.
Good point on the language vs. platform distinction.
I'm not getting this hammer metaphor. OK, so a hammer is good for pounding nails and not good for fixing a watch. If we're having this whole discussion because people have noticed that PHP is the frequent common factor in buggy, poor-security web applications, then what is PHP actually good for?
i think the article misses the main point. the articles 'bashing' PHP does not say noone ever wrote good code in PHP or ever will. rather that we should change the situation where PHP is the de facto std for beginners on the web, because in their opinion there are superior alternatives. that's a valid concern imho, i mean it is 'not valid' to question wether there is good PHP code, but it is 'valid' to question whether PHP should be the std beginners language). sry for my english.
De facto standards are de facto standards not because somebody decided them to be. It's because people choose it. So discussing what people "should" choose is pointless - they choose what they like, not what somebody thinks they "should".
i disagree. first you copy others, discover and then you may alter/fine tune your decision. de facto standards are standards because "we" decide them to be.
Take for example my current bread and butter, C++. Because it was designed during a time when people still really cared about speed, a number of design decisions were made for the language (eg, non-virtual by default) that may not make sense today. This is just the tip of the iceberg; I trust I don't need to go on about exceptions or the various things left out of the spec or "left as a decision for the compiler implementers".
Now, I know many of the problems with C++, and I'm willing to admit them. It only seems logical, if you are competent at using a tool, you are familiar with its limitations and will admit to them, and maybe justify them in the context of tradeoffs.
This cannot be said of many who defend PHP. I'm not going to rehash criticisms of PHP, but it seems to me that the shortcomings of the language can't be justified by tradeoffs because there were no benefits gained by the downsides that are in PHP. It really seems like an ad-hoc spaghetti mess. That many defend this by citing irrelevant facts ("it's popular!") or debatable facts ("it's easy!") while not addressing the shortcomings at all, tends to lead me to believe that defenders of PHP are lacking in professionalism and probably have little experience of other programming languages.
That articles like this one keep coming up is a sign that people (mainly PHP defenders) can't just admit their language has downsides like everyone else's (okay, maybe more than everyone else's) and move on.
EDIT: A little less inflammatory.