Ask HN: How do you decide which language to use for a project?

5 points by pc86 ↗ HN
For those of you who know several languages, what criteria do you use to determine which language suits which projects? Have you ever learned a language specifically for a project?

I will be starting a new project soon and have carte blanche in terms of language/architecture, etc, including something new. Are there certain flags that indicate one language or group of language over another?

6 comments

[ 3.4 ms ] story [ 17.5 ms ] thread
I don't learn the syntax or function names in languages or libraries or frameworks, I read about what that it's particularly good (or bad) at and tuck that away in the back of my brain.

When I have a problem and I get to pick what I want to make it with, I consult all this information stored up in my head combined with a bit of research on google.

I choose which language to use based on what the language is known for.

Example: I'd choose C for heavy lifting tasks, because it's fast and (can be) efficient. But in a personal project, which I do in my free time, I'd choose Node.js. Just because I like JS.

If you know several languages well, the project's characteristics will usually make the language choice obvious.

I'd recommend against learning a new language for a new project.

Personally, I'd favor the language you're most comfortable with and has the best tools, frameworks, preexisting code, etc. for getting your project done. It's a trade off in both respects, but you can usually find a happy medium.
I think my method is inefficient but I start out trying hello world in a few languages and playing around with how easy to install and work with it is. I tried one project in SWT and decided it hurt my brain so I went to Swing. I tried RoR and realized I was way in over my head and went to GWT because I knew Java. So in essence, I choose the path of least resistance but am always willing to test drive a few paths. Chances are the code will be rewritten in 5 years anyway.
Availability of libraries may be an issue. I recently decided to go with Python instead of Ruby for my side project because it has a great symbolic mathematics library named SymPy.