Dan's Musings

Which Programming Language Should I Chose? Part III: Conclusion

This post is the last in a series of posts about programming languages.

Conclusion

Programming languages have been discussed at length in this series. We end here with a questionnaire and table showing what programming language should be chosen precisely based on one's needs.

Before it is presented, we know to caveat to the below: the front end. Front end is a complicated mess but in general the language is often picked for you based on the phone or device on which your code will be running. Sometimes there is a choice, sometimes not.

The front end is only the largest of the caveats surrounding the general advice presented below. However, The advice found in the questionnaire below follows strong general principles that still have merit.

Questionnaire

Am I working on embedded, OS, database, or other performance-sensitive environment? If so, use management-free languages; otherwise a memory managed, CPU managed language.

Supposing I chose a managed language, do I need to distribute the build artifacts to other people outside my organization? If so, choose a platformless language; else choose a language with a platform.

If I chose a language with a platform, does the language need to work with large amounts of code written in a management-free language, such as natively written libraries or the browser? If so, choose an interpreted language; else choose a VM-based language.

Is my team small, but needs to be as productive as large teams in order for my company to survive? Alternatively, is the team working on some very difficult problem? If so, exercise lenience when the team suggests using a language with more power or with some fancy feature in it.

Are the language features truly compelling to the developers, with minimum viable community established? If so allow the team to pick a smaller community language; otherwise choose a language with a large community.

Consult the following chart to see which language you picked.

gc plat interp untyped small weird language
no no no no no no C, C++
no no no no yes no Zig, Hare
no no no no yes yes Rust, Carp
yes no no no no no Go
yes no no no yes no Crystal
yes no no no yes yes Haskell, OCaml
yes no no yes yes no Julia
yes no no yes yes yes Janet
yes yes no no no no Java
yes yes no no yes no Kotlin
yes yes no no yes yes Scala
yes yes no yes yes no Groovy
yes yes no yes yes yes *
yes yes yes no no no TypeScript
yes yes yes no yes no Dart
yes yes yes no yes yes Elm , Scala.js
yes yes yes yes no no **
yes yes yes yes yes yes ***
yes yes yes yes yes yes ****

*: Common Lisp, Clojure, Erlang, Elixir, F#, Racket, Scheme.

**: Javascript, Lua, Perl, PHP, Python, Ruby

***: CoffeeScript, Vimscript, ColdFusion

****: ClojureScript, Hy, Fennel, Elisp