Jesus christ guys. It were probably others than visitors from HN (most here are a little more thoughtful and less trolling), but if there is nothing but negativism on the PHP page (I can't find a single positive point) then why in the world are we all using it? Why does almost everyone know the language? Why is it one of the biggest languages on the planet?
I don't trust this site anymore just because of the first item I happen to look at. PHP may or may not be a horrible language, but certainly it has some good uses and advantages to other languages, or it would never have become popular at all. Perhaps it's just because PHP is so easy and that's the only reason. I'm not saying it is, but it might be. But then at least that should have been written on the page.
My take on why PHP is popular: web programming back in the late 90ies was not easy, and the tools available looked something like this:
* Perl CGI's, and, later on, mod_perl. Worked pretty well, and Perl is a serious language, but things got big and clunky, especially with mod_perl. CGI's are kind of slow.
* Various proprietary Tcl solutions. These were very cutting edge in many ways, but were open sourced far too late.
* Java towards the very end of the decade. Then, as now, it was a fairly heavy-duty solution; not suitable for, say, adding a dynamic time or something like that to an otherwise static page.
* PHP. Fairly easy to install compared to the alternatives, and reasonably easy to get started with. You did not need to understand classes, OO, and how to compile things just to get a dynamic web page up and running.
In short, PHP "scales down" in terms of programmer effort to get started, giving people at the margin the ability to do something they otherwise would not have. Granted, that something might have been quite ugly, but at least you could get started.
Particularly ironic is PHP ranking high for ``This language is likely to be a passing fad''. Given its 17 years of history and recent the recent progress with versions 5.3 and newer... whoever voted on this position either wasn't aware of PHP's actual situation and outlook, or was just being thinking wishful.
-- EDIT --
> Why does almost everyone know the language?
If anything, it is that almost everyone can dabble in PHP and ^C^V some code. IMHO real knowledge of PHP and its ecosystem seem to be quite rare -- judging by reading some published code, which was as generic and un-PHP as possible, and by comments attached to the official docs.
Given its 17 years of history and recent the recent progress with versions 5.3 and newer... whoever voted on this position either wasn't aware of PHP's actual situation and outlook, or was just being thinking wishful.
I don't know, I think it's a good prediction. Look at this chart for example (yeah, I know... tiobe isn't necessarily an accurate indicator but still):
In the 2000s, PHP was everywhere. But recently, Rails, Django, Node.js etc. seem to be much more prominent. Maybe thinking of PHP as a fad is slightly... optimistic, but I wouldn't call it "wishful thinking" as if PHP was here to stay forever as one of the most popular server-side languages.
I'm not saying PHP is going away this year or the year after that, but consider that some languages that go back to the 50s (Lisp) are enjoying newly revived popularity (Clojure). Do you really think this would happen to PHP in 2050?
I use plenty of javscript and PHP at work. They are poorly designed languages, IMO. (I am not an expert, but I'm familiar with many languages and I always read up on such topics)
>Jesus christ guys.
Despite the poor design considerations and wanting to kill off some of these languages, (or-rehaul them and not being able to) many of us still have to use them day-to-day. This is one of those things that convinces me that there is a God, and he's got a twisted sense of humor. I can't really explain it otherwise. :p
Regardless whether PHP is a poorly designed language, or if it has some sense of "design" at all, the website should have listed good uses of PHP. There are plenty.
I don't agree. PHP is fast, in development and in execution, and has a wide range of libraries (sort-a) built in to it. If you need the 1.000th prime number, a list of every possible name with 4 characters, or a working webpage, PHP offers it all.
Of course, if you take each case individually, you might want to consider other languages. But having to learn another ten programming languages which are slightly better for a job than PHP is, costs a lot of time and effort.
PHP is a great language, if you get used to the weird and inconsistent function names.
This is where I disagree strongly: as a programmer you should already know all ten of them [languages] and constantly be on a look out as to which of them use where. While in time my set of immediately usable for not trivial tasks languages was morphing significantly, I tried to keep my toolbox full, maintaining a solid 6 (my mind seems comfortable with that many) languages ready for work.
There are some minor points I disagree with, for example, Python, Ruby, Perl and node package managers are all very good, while PEAR is/was a pain to use (a pain: I couldn't install desired package in a minute on the first try) and so on, but it's irrelevant: what I object to is a notion that it is not worth knowing or using different tools because the one you know already "offers it all".
All I'm trying to say is, I like PHP, I use it a lot for 'daily use'. That is, programming small things for personal use. I gave some examples earlier.
And as I said, there are situations you'd think of another language than PHP, but that doesn't mean programming in PHP is a bad practice.
> but that doesn't mean programming in PHP is a bad practice
Of course not! We are agreeing on this - I'm just noting that programming exclusively in PHP (or any other language for that matter) is bad practice. I have nothing (or not very much) against PHP :)
I think there's an inherent tension between the properties of a language that make it seem approachable to novices and those that make it suitable for large, complex programs. A good example is the way that novice languages try to gloss over the differences between the various common representations of numbers: integers, floating point numbers, and numeric strings.
Compounding this problem is the fact that the people who feel naturally most motivated to create languages for novices are often those who are not too far removed from their own experience of learning to program. They are thus not as well informed about language design problems and solutions as we might wish. On the other hand, computer scientists who have that background tend to be more concerned with writing and maintaining large, complex programs, since that's the problem they're faced with all the time, and to have forgotten the difficulty of first learning to program -- or if they haven't forgotten it, they at least realize that that was the easy part.
We've seen this pattern enough times now, where languages get widely used despite their designs being excoriated by the cognoscenti, that I think it can't be written off to accidents of history. Cobol, Basic (in multiple incarnations), Fortran, and now PHP and JavaScript -- I'm sure I'm forgetting some. Anyway, the point is, there has to be some reason this keeps happening.
If I'm right, then the only way we'll get beyond it is if enough kids learn some programming in elementary school, more or less, and do a fair amount of programming in high school, so that by the time they hit college they're past the initial hump and are ready to start learning about software engineering, which is fundamentally the management of complexity. It's very difficult to appreciate the need for "bondage and discipline" until you've worked on a codebase where things that should have been simple turned out to be difficult or impossible.
> But then at least that should have been written on the page.
As of this comment,
#12 is I would use this language for a web project.
#14 is I know many other people who use this language.
#16 is I learned this language early in my career as a programmer.
#17 is This is a mainstream language.
It is a collection of statements about the language. So ranks low in 'easy to shoot yourself in the foot' means that most people did not think that java or python was 'easy to shoot yourself in the foot'.
ie. the low ranking statements mean that the language is not like that statement.
Yes! I was very confused when I saw that Python was ranked high for being "good for beginners" but ranked low for being "usually bad for beginners". Then I realized it was actually actually intended to be ranked low in terms of being "bad for beginners". Which makes sense, if barely.
If you're going to have "ranked high" and "ranked low", make all the attributes positive.
Yeah, Python is good case study for confusion as it has a lot of negative sentences in "ranked low".
I see in this thread that many people complain about it, so I've emailed author with the link to this thread and to Python's page and suggested renaming "Ranked high/low" to "Most people agree/disagree that..." or sth like this.
I learned Visual Basic .NET in high school. It honestly wasn't nearly as bad as its reputation. It's more like a watered down C#. It's pretty decent once you get past the syntax. There's still no reason to pick it over C# though. One thing I can say I prefer in VB.NET is the handles syntax - private sub blah blah .. handles object.event. A bit more elegant than C#'s making the event function and adding it to the object with +=.
Still used heavily - but not in industry exactly. It is used mainly for creating little button macros in Excel documents to do some calculations in the document.
It is generally not used directly - Excel lets you record a macro, where it will transform the user's clicks and actions into VB script directly. Users can then add this script to a button, and can repeat their actions by clicking on the button. So not a programming language, but more of a macro language.
It's crowdsourced, so you shouldn't comply about the site, but its audience.
Anyway, I agree that if my C# code compiles, it does probably work. Just like Java, C# makes it hard to shoot yourself on the foot (and also to shoot at all, like somebody already said here).
Well, doesn't really work out.. Example for python:
Pro #2: This language would be good for teaching children to write software
Contra #1: This language is unusually bad for beginners
Uhm.. ok.. so this shows how subjective it is to rate a programming language. It depends more on the individual and its own thinking process and experience then on hard facts.
The ranking process requires answering 110 questions.. I can not imagine you would actually need that many questions.
Perhaps the author can use the already submitted questionnaires to see which questions correlate heavily, so they might be merged.
The only language I know from this list that I wouldn't recommend wholeheartedly to someone else is Java, and that's just because I know C#.
A bunch of languages I know very superficially, and just haven't learned because I didn't like their superficial qualities. Anyone here ever mastered (not just learned) a language that they did not like at all? I don't like Java all that much, but it is not absolutely terrible.
(From this list I am comfortable with Ruby, Haskell, C#, Java and Javascript, less comfortable with C, C++, Scheme, Python, ASM, Matlab, VB, PHP)
- I often get angry when writing code in this language
- There is a lot of accidental complexity when writing code in this language
- This language has an annoying syntax
I found the interface for actually giving my answers to the questions unusable, at least for such a large number of questions. ("Large" in this case, I would probably say is "anything more than 5".)
When something is ranked low for a bad thing, is that good (and I think it is) or is that bad? For instance, python is ranked low for "There is a lot of accidental complexity when writing code in this language", which I think means that there is NOT a lot of accidental complexity when writing this code, but it might confuse people because it looks like you are presenting two lists, a list of top pros and a list of top cons.
Same, no problems at all. Was surprised at the negative comments but after checking again I can understand the ambiguity of ranking low for a negative item. I often have that problem with English speaking, but this made sense to me.
I'd say it ranks low on "the presentation is difficult for programmers to understand".
I found the survey really slow - perhaps the server is being hammered too much? 1 question submit is taking at least 10 seconds at the moment, which means 20 minutes to just submit all questions without reading them and reordering answers. Improve the site first, if you want to gather more data quickly.
I love the idea behind this. The issue is that the questions are not MECE (mutually exclusive, collectively exhaustive - en.wikipedia.org/wiki/MECE_principle). Perhaps counterintuitive, but fewer questions would actually lead to a richer dataset were they MECE.
Is this really correct? The impression i've got of D is that it started as "Take C, remove everything that sucks and add other nice features". It surely looks more like C / C++ than some functional langage too me.
The "Most similar to" feature is not necessarily a reflection of the language's features, but of how closely they rank in the questions (which are largely subjective, and lack technical depth.)
You're correct though, in terms of features, D is closer to C++, C#, Java.
Jesus christ guys. It were probably others than visitors from HN (most here are a little more thoughtful and less trolling), but if there is nothing but negativism on the PHP page (I can't find a single positive point) then why in the world are we all using it? Why does almost everyone know the language? Why is it one of the biggest languages on the planet?
I don't trust this site anymore just because of the first item I happen to look at. PHP may or may not be a horrible language, but certainly it has some good uses and advantages to other languages, or it would never have become popular at all. Perhaps it's just because PHP is so easy and that's the only reason. I'm not saying it is, but it might be. But then at least that should have been written on the page.