Programmers.SE has plenty of questions of beginner programmers asking if they must use a specific language or another one in their daily work, or if they must learn a language or another. Those questions are quickly closed, and when they receive answers, those answers are of type:

Use what is best for a specific project.

There are languages that cannot be reasonably used for some sorts of projects. For example, it would be strange to use Assembly to create a dynamic website, or to use PHP to create a rich desktop Windows application or to use Ruby to create a video game with hardware acceleration.

But in general, does the "Use what is best for a specific project" rule work?

  • If I create a simple business desktop application, how can I say that for this business app, C# is not appropriate at all, while Java is the best choice?
  • If I create an ordinary small or medium-scale website, how can I say that I must use C#/ASP.NET MVC over Ruby on Rails?

Comparing mainstream languages, they are all pretty similar. I choose C# over Java because I don't know Java very well; I choose ASP.NET MVC over PHP because in my opinion, PHP sucks; I choose PHP over ASP.NET MVC when my customers have a web server running Linux. In all cases, every time I have to to a choice, I consider:

  • my skills in the languages to choose from,
  • languages I personally want and enjoy to use,
  • software and hardware requirements (i.e. difficulty to deploy Java or Ruby on Rails website on a server which has already a support for PHP),
  • legacy and interoperability concerns.

Does it mean that I lack broad knowledge in several  languages? What happens in other companies? Is there a real choice, for every project, of the language which is the best one in a precise case? How could such choice be made in a situation where the mainstream languages are so similar?

  • 1
    Note that for any non-trivial project you will need to be several people working on it and you most likely will have different skill sets. – user1249 Aug 6 '11 at 18:46
  • If you don't have at least some freedom to choose the language, you're probably not going to post a "what language should I use?" question. That leaves "what should I learn because its popular?" and "what horse should I choose for a particular course and why?". The first is answered by a few popularity contest sites. The second is hard to answer if no-one tells you which course, so you tend to get the generic "whatever works for the project". – Steve314 Aug 7 '11 at 1:08
  • "comparing mainstream languages, they are all pretty similar" -- since you know this ... your question now becomes... "why are there so many similar languages" .. and the answer to that is your answer too. – treecoder Aug 7 '11 at 5:04
  • "If I create a simple business desktop application, how can I say that for this business app, C# is not appropriate at all, while Java is the best choice?" You can't. If it needn't be cross-platform then your UI will be done far better and in less time by favoring C# (with WPF or Winforms) over Java and Swing. Just because the UI-Framworks are far better in .NET. I know both worlds equally well. – Falcon Aug 7 '11 at 8:16

As we engineers all know, there is no such thing as the best, best can only be defined if you have some kind of metric to compare alternatives.

  • Do you feel comfortable in working in that language? If not, you'll probably pick bad design choices on the language level.
  • How fast can you develop features for your app in that language? Is it easy to extend functionality for an existing code or it is going to be a PITA because the language creates too much constraints?
  • Is the language fast enough? For some tasks this is mandatory, for others, where you can easily scale with multiple machines it hardly matters.
  • Does it compile to native code? For some software this is mandatory, people won't install your small up if it comes with a 50-500M runtime environment.
  • Does it provide the necessary libraries and tools (reading XML, working with all kind of databases, etc..) You don't want to reinvent the wheel. Ok, this is probably not the best point on the list, most languages are mature enough for this, but if you pick a relatively new language/framework this can be a problem.
  • If you need external hosting, is it well supported?
  • (if the project is large enough) Is it easy to find developers? Are they cheap? This is an economic factor. I agree that PHP sucks, but there is an abundance of PHP developers and they are cheep (at least compared to a Java or C# developer). Let's be honest, making an average website is not rocket science, doesn't require much skill (at least until you have a lot of visitors or a really complex system).

So, a metric is a mixture of all these factors with different weights. Now choose your weights and pick the best ;)

Because the weights are judged subjectivily I would say that theoretically YES, there is an ideal language (or a handful of languages) for a specific project, but practically NO, you have to choose a language you are already familiar with and think that is the best for the job.


A trademan always uses the right tool for the job. As a rule a programmer will usually turn every problem into a nail so he can use his hammer.

The reasons for this is unlike an avaerage tradesman, who has a hope of becoming proficent using all the commonly avalible tools, an average developer has no hope, and therefore must become proficent in one or two "tools" of many, or pretty average in many and proficent in none.

Therefore the "best choice", unlike a trademans, is more about the environment than rather than the technical "best". For instance I am aware of a large project recently re-written in Java, from an ADA source base, largely bacuse you cannot recruit ADA developers anymore, and Java programmers are a dime a dozen. Java is probably a long way from the ideal technical solution, but Erlang (likely a better langugage for thier problem domain) isn't even a starter in 2011.


Often enough you have a choice of several equally adequate languages and you can simply choose the one you like best.

In many other cases there are clear restrictions that sort out at least a large part of possible choices. If you application needs to run on different operating systems, then Windows only languages like C# are not on the list anymore.

  • Company culture or politics might also rule out otherwise reasonable choices – Kevin Aug 6 '11 at 18:53
  • @Kevin, that somehow goes under the "what you like best" clause. "Company Culture" is just what our company likes best and for what it has the most resources. – thorsten müller Aug 6 '11 at 18:57
  • Yes but there is a difference between what the company likes and what an implementing developer likes. Typically the same but not always – Kevin Aug 6 '11 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.