Is it a case by case basis or are there some languages you can compare and really have an honest, non-fanboy, completely measured quality difference between the two?
"Quality" and "better" are both completely subjective terms. So if you're asking about the general, ostensibly objective case, the answer really is no. Even languages like Brainfuck serve a purpose.
If you restrict your answer to a particular person's style or a particular project (or even class of projects) and its needs, the answer becomes most definitely yes, there will be some languages well-suited to the task and others that are not.
The answer is no. The quality of a language depends on the problem you use it on. Not every language is good for every problem, but for every problem there is at least one ideal language.
That is completely subjective since there is no way to tell without defining what means better.
That being said, you may find this site interesting. It compares language in terms of speed and memory usage, in a variety of algorithms which were implemented in each language.
I'd say there are two possible cases here, for any two languages A and B:
1) Some projects will be better/easier/faster in A, given other constraints (the people working on the project, the target environment etc). Likewise some projects will be better/easier/faster in B.
2) All projects will be easier in A than B (or vice versa).
Case 1 occurs vastly, vastly more often than case 2. Indeed, I'd say case 2 would occur only in deliberately crafted circumstances. For example, you could create a language C~ which is C# but without the "using" statement. At that point, I'd say that C# is genuinely, objectively better than C~. However, most of the time it only makes sense to compare languages in the context of particular projects, requirements and constraints. Even then it's likely to be a balancing act rather than one language "winning" on every possible criterion.
Recommended reading No Silver Bullet - Essence and Accidents of Software Engineering
Depending on the task at hand yes.
It would be downright idiotic to write a basic webapp like a forum in c++. The alternatives like python and php are better.
It would be silly to try and write a cross platform painting application in visual basic.
If you need a lot of cheap developers lisp and haskell are bad choices.
I'll answer yes. Theoretically, this is possible. However, it's a complicated and expensive project and it's even harder (if not impossible) to draw general conclusions that are not confined to one problem domain.
One good example is a study undertaken by Lutz Prechelt in 2000 that compared several languages, including C, C++ and Java:
An Empirical Comparison of Seven Programming Languages
Unfortunately, most discussions comparing different programming languages aren't based on any empirical evidence and are next to useless.
I do think some languages are better than other; but there are lot of competing (and sometimes opposed) qualities. also, I think the relative importance of these qualities is totally subjective, so the final 'score' is up to you, even if each individual aspect were 'absolute'.
some good differentiating points between languages, in no specific order:
- standard libraries
- ease of extending
- minimalism
- adherence to principles
- as little 'magic' as possible
- ease of parsing
- good implementations (VM, JIT, compilers)
- availability
- ease of embedding in applications
- ease of packaging your app in a simple installer
(some of these are more about the implementation than about the language itself; but in practice they come together in most cases, so they're a big part of choicemaking.)
For me, all this means my favorite is Lua (wins in 2,3,4,5,7 and 9), with Python as a reasonable alternative (1, 8, 10). Special mention to JavaScript, only because of point 8, but hopefully soon 7
There's a lot of fanboyism involved, but in many cases you can always assert that a language is better than another for a particular situation.
Many languages have special or unique features that make them easier to work with in certain contexts, thus making them a "better" option. Some examples:
- Assembly is the definitive language when you want terse, memory-tight code (think microcontroller development).
- ADA/Erlang are kings when you need to have many concurrent processes.
- Java was the first "write once run everywhere" language.
- Perl/Ruby are great for handling large amounts of text.
- Python is GREAT for everything (read: batteries-included approach). (allow me some fanboyism, please :)
Obviously, some languages are made great by the tools they provide, not only by their features:
- VB and Delphi became really popular because their IDEs allowed people to design fancy UIs with minimal code and in record time.
- Ruby became popular after Rails became the hallmark of web frameworks.
- 'Script' languages are normally better at handling text.
- PHP provided easy ways to access request variables, etc.
And then some others are perceived as better for a particular task:
- You write Linux kernel code in C, because that's what 'they' use. Even if you can (and you can) you won't want to write kernel code in Pascal.
- You write big .NET projects in either C# or VB, although you could be using Nemerle.
- If you have some brain you do your client-side web scripting in Javascript even if you could use VBScript (and limit yourself a lot).
You are always working in some context or another so, in conclusion, there's always going to be a 'best' language for your situation. And there's where the fanboyism kicks in and makes you chose one over the other.
Obviously you can always make the point that some languages have better system integration, or better abstraction, or better XML support and so on, but most modern languages will provide the tools to make these irrelevant.
Some of the answers here have been "yes, depending on the circumstances".
This is correct, where one language has features that another hasn't and vice-versa. Given the complexity of life there will always be circumstances where one is better. If you can't distinguish which is best in a circumstance, it does not mean they're equally good, just that you are imperfect at distinguishing.
Take for example, C. Given two languages, C and "C without a for loop", I can tell you with certainty that the former is better than the latter.
Unfortunately this analogy must be taken with a pinch of salt when comparing different languages. In the above example, all other things were being equal, but in the real world, using a language has lots of other consequences, such as the wage of your programmers etc.
I agree with those who say "yes, depending on the circumstances".
I actually think it is a rather deep subject, and actually there are silver bullets, but not everybody has the right kind of gun. Here's my not-so-humble blog posting on the subject: link
"I'll begin with a shockingly controversial statement: programming languages vary in power.
Few would dispute, at least, that high level languages are more powerful than machine language. Most programmers today would agree that you do not, ordinarily, want to program in machine language. Instead, you should program in a high-level language, and have a compiler translate it into machine language for you. This idea is even built into the hardware now: since the 1980s, instruction sets have been designed for compilers rather than human programmers.
Everyone knows it's a mistake to write your whole program by hand in machine language. What's less often understood is that there is a more general principle here: that if you have a choice of several languages, it is, all other things being equal, a mistake to program in anything but the most powerful one. 3
There are many exceptions to this rule. If you're writing a program that has to work very closely with a program written in a certain language, it might be a good idea to write the new program in the same language. If you're writing a program that only has to do something very simple, like number crunching or bit manipulation, you may as well use a less abstract language, especially since it may be slightly faster. And if you're writing a short, throwaway program, you may be better off just using whatever language has the best library functions for the task. But in general, for application software, you want to be using the most powerful (reasonably efficient) language you can get, and using anything else is a mistake, of exactly the same kind, though possibly in a lesser degree, as programming in machine language.
You can see that machine language is very low level. But, at least as a kind of social convention, high-level languages are often all treated as equivalent. They're not. Technically the term "high-level language" doesn't mean anything very definite. There's no dividing line with machine languages on one side and all the high-level languages on the other. Languages fall along a continuum [4] of abstractness, from the most powerful all the way down to machine languages, which themselves vary in power.
Consider Cobol. Cobol is a high-level language, in the sense that it gets compiled into machine language. Would anyone seriously argue that Cobol is equivalent in power to, say, Python? It's probably closer to machine language than Python.
Or how about Perl 4? Between Perl 4 and Perl 5, lexical closures got added to the language. Most Perl hackers would agree that Perl 5 is more powerful than Perl 4. But once you've admitted that, you've admitted that one high level language can be more powerful than another. And it follows inexorably that, except in special cases, you ought to use the most powerful you can get.
This idea is rarely followed to its conclusion, though. After a certain age, programmers rarely switch languages voluntarily. Whatever language people happen to be used to, they tend to consider just good enough.
Programmers get very attached to their favorite languages, and I don't want to hurt anyone's feelings, so to explain this point I'm going to use a hypothetical language called Blub. Blub falls right in the middle of the abstractness continuum. It is not the most powerful language, but it is more powerful than Cobol or machine language.
And in fact, our hypothetical Blub programmer wouldn't use either of them. Of course he wouldn't program in machine language. That's what compilers are for. And as for Cobol, he doesn't know how anyone can get anything done with it. It doesn't even have x (Blub feature of your choice).
As long as our hypothetical Blub programmer is looking down the power continuum, he knows he's looking down. Languages less powerful than Blub are obviously less powerful, because they're missing some feature he's used to. But when our hypothetical Blub programmer looks in the other direction, up the power continuum, he doesn't realize he's looking up. What he sees are merely weird languages. He probably considers them about equivalent in power to Blub, but with all this other hairy stuff thrown in as well. Blub is good enough for him, because he thinks in Blub.
When we switch to the point of view of a programmer using any of the languages higher up the power continuum, however, we find that he in turn looks down upon Blub. How can you get anything done in Blub? It doesn't even have y.
By induction, the only programmers in a position to see all the differences in power between the various languages are those who understand the most powerful one. (This is probably what Eric Raymond meant about Lisp making you a better programmer.) You can't trust the opinions of the others, because of the Blub paradox: they're satisfied with whatever language they happen to use, because it dictates the way they think about programs.
I know this from my own experience, as a high school kid writing programs in Basic. That language didn't even support recursion. It's hard to imagine writing programs without using recursion, but I didn't miss it at the time. I thought in Basic. And I was a whiz at it. Master of all I surveyed.
The five languages that Eric Raymond recommends to hackers fall at various points on the power continuum. Where they fall relative to one another is a sensitive topic."
-- Paul Graham
See the following also:
I agree with most people that the answer depends on "for what?" A Priori, I'd say that No, no language is better than any other language.
HOWEVER, there ARE languages that are WORSE than pretty much any language... Intercal, and Brainf*ck for example...
(Yes, the second paragraph made exactly as much sense as you think it did. Where the examples are Intercal and Brainf*ck, you can't expect normal logic to mantain B-)
Yes. If you ask the right question. You need to add " for ..." to your question. "Is one language better than another FOR ...". In other terms: A race car is great for winning races, but it's terrible for plowing snow. A snow plow is terrible for winning races but is great for plowing."