Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was having a small talk between teammates about how you choose a programming language for use in a project which lead me to think that there are many criteria to choose one in the beginning of a project but no real standard.

Do you chose a programming language for the syntax and semantics? Or do you choose one because it has the best support to do certain things? Or because you have better libraries? Or do you choose it for the paradigm?

What criteria do you use to choose one language when you are going to do a project?

share|improve this question

closed as primarily opinion-based by Bart van Ingen Schenau, ratchet freak, Kilian Foth, Dan Pichelman, psr Sep 23 '14 at 19:36

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

I actually caught myself thinking const Haskell :: [Constraint] -> ProgrammingLanguage. – dan_waterworth Jan 12 '12 at 16:05
up vote 16 down vote accepted

My criteria, in order:

  1. Is it the right tool for the job? For example, if you're building a graphical, networked desktop client, you'd want to use a language that supported that sort of thing out of the box like Java or C#. OTOH, if you're working on a realtime system, you'd want something that gave you more predictability and low-level control (like C).

  2. Is it appropriate for the environment? Are compilers/interpreters readily available for the target platform?

  3. Is it something I'm already familiar with, or is it a language I can pick up quickly? For example, since the bulk of my experience is with C and C++, I can quickly pick up languages with similar syntax (again, Java or C#) easily. Something that's in a completely different family (like Haskell) would take me more time to get comfortable with.

  4. Is it something that's well-supported, with plenty of references both online and on paper?

share|improve this answer
To add to #1: Where is this thing being deployed? Are automatic updates important? If it's not web based Does it need to be cross platform? If it is web based, what server architecture are you using? I upvoted your answer because I think implementation is the very first question to ask. It's like asking 'what' before asking 'how', especially in a client facing project. – ioSamurai Apr 4 '11 at 17:12

A lot of factors would come into it I guess

  1. Does the language lend itself well to the application type you are going to code?

  2. How well versed are you in the programming language? (Becomes more important as the deadlines get smaller)

  3. Library and language features for a certain area in your application.

  4. Is it a new language? Has it been tested and proven in the current domain?

  5. How many people actually code in it? Important if you need help and there's an active and large community

share|improve this answer

Important criteria for me are:

  • prior experience with the language.
  • tool/vendor support for the language.
  • library/ecosystem support for the task and the language.

I would say syntax and paradigm are not as important.

I would not choose a new language because I liked the syntax or paradigm but had poorly functioning tools and a minimal library that could not do most of what I need it to do.

share|improve this answer

Languages are tools. As with any tool, you have to take several things into account:

1) Do you have access to the tool?
2) Do you know how to use the tool?
3) Of the tools that meet criteria 1 & 2, which is the best for your job?

If you only have one tool, the answer is simple. If you have a dozen tools, then you need to look at hosting, maintenance costs, and other such peripheral issues.

share|improve this answer

This is probably gonna get me downvoted, but the most important thing to me is syntax. With programs spending far more time and effort in maintenance than in original writing these days, the ability to pick up a piece of unfamiliar code (someone else's, or my own if I wrote it more than 6 months or so ago) and quickly determine the intent of it is statistically one of the most important skills a modern programmer can have. A clean, easily readable language helps immensely with this.

After that, in no particular order,

  • Good standard library
  • Good IDE and tools
  • Strong community, especially the open-source ecosystem
  • The ability to generate a fast, efficient final product
share|improve this answer
So, by that argument, for you, Ada is your first choice and PERL is an invention of the Devil, am I correct? – John R. Strohm Apr 4 '11 at 18:11
@John: My language of choice is actually Delphi, which is a distant cousin of Ada. The Pascal-derived syntax is nice, but Ada never really developed a strong community. As for Perl, I'll let Alan Kay answer that one. "Perl is another example of filling a tiny, short-term need, and then being a real problem in the longer term." When you consider how software is used in every aspect of life these days, it's not hard to make a case that the world would be a lot better place if Perl and C had never been taken seriously by the computing industry. But hindsight's 20/20, as they say... – Mason Wheeler Apr 4 '11 at 18:24

I only use the languages I know best:

  • Java for pretty much everything
  • SQL for the database
  • Tiny shell scripts & command-line scripting
  • HTML, CSS, and JavaScript for Web front-end

I don't try to learn a new language when I start a serious new project. I use what I know.

share|improve this answer
-1 i) How that answers the OP question? ii) Sorry, with so many new DSL's being created each day, I really don't think that's a behavior to be proud of. iii) The Pragmatic Programmer gives a very popular (and helpful) advice: learn a new language every year. – rsenna Apr 4 '11 at 18:45
@rsenna: playing Devil’s Avocado, I think we can sometimes get a bit macho about our capacity for learning new languages. There’s something to be said for starting work in languages you know well first, identifying where your pain points are, and then seeking out languages that will actually help you solve them. – Paul D. Waite Apr 4 '11 at 21:44
+1 to cancel out that -1, because in almost every real-world situation you'll do a better job with the language you know best, than you will with a different language which is a better fit for the problem, but which you're less familiar or unfamiliar with. – Carson63000 Apr 4 '11 at 21:49

The cost to build an application is nearly proportional to the code size, so to minimize cost I choose the most powerful language that has been used to solve similar problems. I don't worry about the number of programmers who know the language since I won't need very many. I also try to avoid vendor lock-in, so I prefer open solutions.

share|improve this answer

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