What programming language should I use? February 22, 2012 | 08:56 pm

My answer to the question: what programming language should I use? Also answers the question: when should I use programming language X?

Silly flow chart.

The above is, obviously, IMHO. And if your favorite programming language isn’t represented here, feel free to assume I’m just fundamentally an evil person.

  • Guest1

    Haha. That is indeed a flow chart that helps decide what programming language *you* should use.

  • Will Rubin

    Please add one more branch for “Needs native Windows toolchain” (no Cygwin nor MinGW). Really! This is what I’m looking for … native under Linux AND native under Windows.

  • http://nCdy.org nCdy

    Fully agreed :) But I will also add (maybe lisp) to OCaml point

  • http://twitter.com/elehack Michael Ekstrand

     OCaml’s an option for that case – they support the MSVC toolchain, although there are limits and a different set of them for that than for MinGW.

    F# or another .NET language could be an option – Mono is about as Linux-native as .NET is Windows-native.

    Finally, a pretty good option in my opnion could be C++ with Qt. Qt gives you sufficiently high-level primitives that it almost feels like you’re writing something at least at the level of Java – with all of C++’s (crufty and ugly) combination and code-reuse capabilities in the STL also available – along with additional things like good multithreading support (including parallel operations on collections).

    As an unrelated aside, I’d also edit Brian’s chart to replace Clojure with Scala.

  • Hamlet D’Arcy

    Why does F# come with the disclaimer/caveat? Is it just anti-MS? 

  • Pingback: What language is best for your new development?

  • http://twitter.com/bhurt42 Brian Hurt

     Yep.  I’m still firmly in the “Microsoft is evil and soul destroying” camp.  Other than being basically tied to the evil empire, F# is a very nice language.

  • http://twitter.com/bhurt42 Brian Hurt

     No.  Or rather, that may be your recommendation, but it isn’t mine.  Static typing is a huge win.

  • http://twitter.com/bhurt42 Brian Hurt

     Full C++, not just the subset that looks like C, is a horrible language, IMHO.  I have the branch on there- if you’re doing windows programming, use .NET and F#.

    RE: Clojure vr.s Scala- I haven’t dug too terribly deeply into Scala, but from what I’ve seen, it doesn’t have the parallelism/concurrency story Clojure does, and not quite as tight integration to legacy Java code.  And the complexity of it’s type system scares me.  IMHO, applications should be no more than a few hundred lines of code- supported by special-purpose libraries.  The libraries will be used by multiple different programs- this program, and whatever future variations of this program it grows into.  So claiming that the type complexity only applies to library writers doesn’t help me- most code is (or at least should be considered) libraries.

    Subtyping/OO + static typing is really hard and complicated to do.  Even Ocaml doesn’t really get it right- notice how effectively no Ocaml programmers actually use the OO extensions.  Although if you add the ability to downcast safely to Ocaml, you’ve got something that’d probably work (this is effectively where F# is- Ocaml plus the runtime downcast safety provided by .NET).  Of course, if I don’t have a need to access legacy OO C#/Java code, my strong preference is to dump OO/subtyping altogether and go pure functinal.

  • http://nCdy.org nCdy

    Ok… that will be really easier to chose if say that… but I always want to add scheme/lisp to somewhere :)