Programming languages ranked by popularity in privacy software
I was bored, so I compiled a list of 77 of my favorite open-source privacy-focused software. This ranges from Android apps to desktop apps to websites to operating systems. I scraped the programming languages used for each one from their respective repositories, and created a simple scoring system to score each programming language.
Obviously there is some bias, since Kotlin is very popular for Android apps and not much else, and it's not an exhaustive list, so some data might be off, but it was still fun to make! Just wanted to share it with all of you, in case anyone else finds it interesting.
The full ranking
Full ranking
C++
C
Kotlin
Java
JavaScript
TypeScript
Python
Shell
C#
Dart
PHP
Ruby
HTML
Makefile
Go
QML
Pascal
CSS
Clojure
Blade
Crystal
Batchfile
Swift
Emacs Lisp
Svelte
Rust
CMake
Haskell
Lua
Vue
Roff
XSLT
Assembly
NSIS
Objective-C
SCSS
Less
PLpgSQL
Objective-C++
Inno Setup
Meson
WebAssembly
ASL
PowerShell
Rich Text Format
GLSL
Common Lisp
Haml
Scheme
Dockerfile
Perl
AIDL
M4
Mustache
D
MDX
SourcePawn
M
Pug
Lex
EJS
Scores for each programming language
Language scores
C++: 13070
C: 11734
Kotlin: 7195
Java: 6727
JavaScript: 5356
TypeScript: 5002
Python: 4250
Shell: 1903
C#: 1873
Dart: 1872
PHP: 1844
Ruby: 1499
HTML: 1389
Makefile: 990
Go: 975
QML: 955
Pascal: 917
CSS: 888
Clojure: 878
Blade: 832
Crystal: 738
Batchfile: 708
Swift: 577
Emacs Lisp: 556
Svelte: 366
Rust: 351
CMake: 342
Haskell: 326
Lua: 300
Vue: 288
Roff: 268
XSLT: 176
Assembly: 167
NSIS: 130
Objective-C: 128
SCSS: 90
Less: 77
PLpgSQL: 66
Objective-C++: 61
Inno Setup: 59
Meson: 41
WebAssembly: 25
ASL: 22
PowerShell: 21
Rich Text Format: 21
GLSL: 18
Common Lisp: 16
Haml: 14
Scheme: 13
Dockerfile: 12
Perl: 12
AIDL: 11
M4: 7
Mustache: 7
D: 5
MDX: 5
SourcePawn: 2
M: 2
Pug: 2
Lex: 1
EJS: 1
The original data
(NOTE: I am NOT looking for criticism on any choices made here)
Rust is ranked #26 with a score of 351. The only program that used it at all was Mullvad VPN. It was used as the majority language for that program, amounting to 35.1% of the entire program.
It was more of a joking question 😅 It's a shame that such a good, lightweight and secure programming language is not used. It's not even in the top 20 😔
I don't think Makefile and CMake should count as programming languages in this context. There are a few weird names on the list, but these are high up the list only because they're glue for C/C++ projects
in the context of privacy the distinction could be interesting: typescript is a microsoft project; foss as it may be… and that might (or might not) have significance
It doesn’t. TypeScript compiles to JavaScript. The compilation process is ostensibly just removing the types. (It also checks types, builds source maps, and outputs declaration files, but none of that is run by the end user.)
Could this be normalised against the baseline distribution of languages for the respective platforms / software categories to see if there are any notable deviations?
I recognized majority of the languages on the list but couple of them I am hearing for the first time admittedly like Blade and Crystal. I am not a programmer, so I guess that might be the reason.
Underrated language for this space: ATS from the ML family, which has a feeling of what if C met SML/OCaml then graduated.
You get more flexibility for memory safety with linear types over affine types like Rust for preventing double free or use after free-like errors (while be general for any use-X-times problems). Refinement types can enforce bounds. Dependent types + viewtypes can build complex, but zero-cost abstraction for your own code or as wrappers over C libraries to make them safe & pushing checks to the compile phase rather than runtme. On top of that, there are proof-level types/values you can interleave in your code instead of using an auxiliary language like Coq or Agda. Compiling/mapping to C you use a lot of the same tooling of C as well as performance charactistic of C (can opt in/out of GC, unboxed types, can layout the memory, as well as TCO); you also get the stable C ABI over Rust’s general difficult to be used in non-Rust projects.
All this to say you have a language that can operate at the system level, type abstractions that go beyond posterchild Haskell, & a proof language to turn those white papers into proof code right in the project. If it didn’t have a special learning curve, it should be a lot more popular in this space.
The only program here I know is SearXNG. My experience with GUI Python apps was pretty bad but I guess it makes it easier for devs to make new apps so it has the right to exist as long as it's not invasive or used in OS components.