top | item 3745084

Poll: What is Your Favorite Programming Language?

19 points| GreekOphion | 14 years ago | reply

These languages are only the most popular. If your favorite language is not listed please pick other and then comment below what it is.

55 comments

order
[+] Onslaught|14 years ago|reply
I think one of the biggest problems when you get into these debates about PHP vs Ruby/Python is that they are always comparing stock PHP with RoR or Django. When you compare Rails to Cake or one of the other highly popular frameworks out there for PHP then that language closes the gap. Yes, PHP still has issues, especially with function naming conventions, but it still fascinates me to no end to see PHP bashed mindlessly when if you compared it to the language without the framework you might see a different picture. Come on guys, wake up and smell the coffee. Every language has its own set of issue, and it has its own set of strengths. If it was about the best, we never would have moved passed languages like Perl and C, both of which I like. I know and use several languages, including PHP, and usually enjoy using each of them when I do.

Oh, and there are several really good (and cheap) hosting providers out there who support PHP, Ruby and Python all on the same setup with no additional charge.

PHP is easier to get into because you don't need a framework to do anything. Ruby and Python both require these, but to take PHP up to the same level as Ruby and Python when they are used with these frameworks, then you have to use a framework as well. At that point, 90% of peoples issues with the language are rendered moot.

[+] brianlynn11|14 years ago|reply
As a self-taught programmer I used to hail PHP as God's gift to mankind until I recruited a team and attempted rapid deployments. The language is just poorly designed compared to Ruby and Python. In face it can encourage some really bad habits for soon-to-be engineers.

On a side note, Coffeescript is one of my fav for it's ease of fixing common bugs concerning global variables, semicolons and equality comparisons. But I am a little turned of by its overblown hype on simplied syntax by its fanboys. They need to realize that, sometimes typing function in JS is just as easy as typing -> in most IDEs.

[+] diwank|14 years ago|reply
Fell in love with Python the first time I saw it. Most of my projects are written in Python. It is simply elegant.

I really like CoffeeScript as well. (Javascript is a real pain to handle sometimes!)

[+] perfunctory|14 years ago|reply
The better you learn a certain PL the more you realize how it sucks. Eventually you realize that all languages suck. P.S. I mostly use python.
[+] greyfade|14 years ago|reply
.. And that some of them you'd rather un-learn
[+] kaolinite|14 years ago|reply
I couldn't pick between C or Python as I use them both in different circumstances and adore both of them. Tis a shame I can't use either in my job - I'm a PHP developer by day and not a big fan of the language at all :-(
[+] tmh88j|14 years ago|reply
Haters gonna hate, but I enjoy PHP. For those who say PHP is sloppy and lacks substance, that's because you write it that way. A lot of the complaints that people have are long gone: - lack of namespace: they exist -goto lines: no one forces you use them! -inconsistent function naming conventions: you choose the names... -magic quotes: no longer exist

My point is there are a lot of people who hate on PHP, but the majority of complaints are issues that you bring to the table. Regardless, I enjoy other languages too. I've been picking up on python recently and it's very enjoyable.

[+] Pewpewarrows|14 years ago|reply
Sorry, but my primary complaints of PHP are in no way related to anything that I've "brought to it." These are all default behavior out of the box:

- Error messages that are often nowhere near where the problem is, and sometimes contain no stacktrace

- PHP-provided function names are inconsistent and follow no set convention, mostly because the language was built without Objects or Namespaces

- The arguments to PHP-provided functions are arbitrarily ordered (such as array manipulations, and string searching). I have to look them up every... single... time.

- Core features of basically every other popular dynamic language took years to arrive in PHP. Hell, it didn't even get a real shorthand array syntax until a few months ago.

- Backwards design decisions, such as having sort-related functions modify data structures in-place.

- Completely insecure on a default install. No directory traversal protection, combined with having urls map directly to on-system files, is a recipe for disaster.

- No isolation or easy support for simultaneous PHP working copies. If I want to work locally on 2 separate PHP projects, each requiring different PHP versions and different (often conflicting) libraries, I have to pollute my entire global workspace.

I could go on, but it's making my blood boil recalling the times I had to deal with this foul stain of a language. There is no reason for a self-respecting developer to ever choose it, especially when alternatives like Python or Ruby exist. Period.

[+] greyfade|14 years ago|reply
There's still the problem of tutorials: There are tons of bad tutorials out there that teach people to write insecure, sloppy, and un-substantive code. The result is a plethora of bad PHP programmers who don't seem to understand seemingly simple concepts like global variables. And much of the practices that result from it are considered idiomatic.

Some of the error messages that PHP spits out are incomprehensible at best, and misleading at worst. Broken code quickly becomes a nightmare.

And frankly, the fact that Rasmus Lerdorf doesn't like programming shows pretty well in the language. His incompetence is all over its "design."

[+] blindhippo|14 years ago|reply
Most of the people who hate on PHP are likely not programming the sort of application that PHP is used for. I generally ignore a .NET/Java/C++ developer crapping all over PHP.

Ruby/Python dev's I pay attention to on the other hand, if only because those two languages interest me. That said, where I am, PHP/Javascript is where the money is, so clearly they are my favorites!

[+] Tangaroa|14 years ago|reply
What do you mean by "you choose the names" with regard to PHP's inconsistent naming conventions? I think most of the upset is due to the standard array functions which can be either array_action($array, $arg) or array_action($arg, $array).
[+] Achshar|14 years ago|reply
Why is it that php, despise of being the most used server side language, (almost) never receives any love (i have noticed it too many times to ignore) whereas python and ruby, despite of getting alot of love, doesn't show usage numbers. i have seen alot of big sites using php, Facebook is the biggest i can think of right now, but python (.py extension) or ruby (i don't know file extension) is not that common (or at least i don't see it). i don't know either ruby or python so there might be some bias in what i see, but i strong feel there isn't.
[+] Pewpewarrows|14 years ago|reply
Because Python and Ruby sites are built properly, and don't expose their filenames as extensions in the url (.py or .rb). In fact, their urls don't even map to actual files to begin with, which immediately avoids several large security holes in PHP-built sites. With PHP you have to do some clever url rewriting and redirecting all your traffic through one central "index.php"-like script.

PHP is the training wheels of the server-side language world. You can pick it up and almost immediately see results on any number of popular hosting providers that provide support out of the box for it. That's why you see it so much.

[+] bcl|14 years ago|reply
Because not everyone is writing code for the web. And because this poll is about your favorite language, not the language you use the most.
[+] fisadev|14 years ago|reply
That's because python and ruby sites do the right thing: a page is not a script, the url should not point to a "file" ("index.php" and such). When using python or ruby, most of the time you use frameworks that let you define your urls, and not just put a script and let the url point to it. Urls should be readable and easy to remember, they are directions for the user. Wich script is running on the server is an implementation detail that shouldn't be part of the user interaction, he doesn't need to tell you wich script to run.

"mysite.com/add_user" is waaaaay better than "mysite.com/add_user.php"

This is one of many bad things php encourages you to do... and that's why most good programmers don't like php, because it makes easy to do bad things.

Some big sites using python: youtube.com, addons.mozilla.org, dropbox.com, disqus.com, ...

Big sites using ruby: twitter.com, jango.com, ...

[+] mrodrigues|14 years ago|reply
The question is "what is your favorite language", not the language that is used the most, or the most easy to learn.

Of course there are good PHP developers and good PHP code, but the language itself it's weak, full of flaws and promotes bad design (PHP encourages the coupling of processing with presentation).

If PHP is your favorite language this is just a sign that you don't know other languages, not at a good level at least.

[+] icebraining|14 years ago|reply
Python and Ruby based websites use routing frameworks, not isolated files, so you don't see extensions.

PHP has routing frameworks too (Kohana, CakePHP, etc), but plenty of (most?) sites don't use them.

[+] tomp|14 years ago|reply
Python websites made with Django don't have a fixed extension for the urls. I expect it's the same with ruby and many other more advanced frameworks.
[+] jimmytucson|14 years ago|reply
I use Python the most but Higher Order Perl changed my life. Voted for Perl.
[+] kkovacs|14 years ago|reply
I prefer to think of it as a toolbox -- the right tool for the right job.
[+] mahmud|14 years ago|reply
AliceML and Mozart/Oz.
[+] cploonker|14 years ago|reply
python

Wondering how the points are assigned to each language.

[+] willvarfar|14 years ago|reply
APL?
[+] quorn3000|14 years ago|reply
In 1982, when I was 10, I was in a personal computer club, run by a guy called Alan Pearman, who had his own company, APL. He ran the club from the back of his office, games, programming, ZX Spectrum, Commodore 64, Dragon 32, BBC Micro, Oric. He had his own machines that he programmed using APL. It just looked like line noise. I was in awe.