Most likely you will use more than one programming language through your career. There's no single "best" programming language, each one has its own use cases, and languages are popular or unpopular for some reasons. Here's my summary:
C/C++ and System Languages
A system programming language usually refers to a programming language used for system programming; such languages are designed for writing system software, which usually requires different development approaches when compared with application software. System software is computer software designed to operate and control the computer hardware, and to provide a platform for running application software.
C/C++ are lower level languages, sometime called system languages, they are best for operating systems, drivers, game engines, machine learning algorithm implementations, or wherever performance is critical. However you need to take care of more low level details, like memory management, so it is error prone.
Newer languages like Go or Rust are trying to make it simpler for the programmer while achieving similar speed as C/C++.
Go was from Google, "for companies who have outgrown languages like Ruby, Python, and Node.js (v8) and have lost patience with the high deployment costs of JVM based languages."
Rust has more complex syntax and semantics (and presumably higher readability costs) in return for the maximum possible performance; low resources usage because it does not use garbage collectors; enforces memory safety, the compiler requires the program to be written in a specific way.
However C/C++ is still the cornerstone of the programming language world. As you may find from the rest of this list, most of the other languages are at least partially implemented by either C or C++.
Java and JVM Languages
Java is both wildly loved and hated. It is very popular in enterprises and also in mobile development, since it is the default language in Android. Kotlin is challenging Java as another officially supported Android language. Scala's popularity is mostly because of Apache Spark. Groovy is seen in Gradle, the build tool of Android. Closure is another JVM language that you may have heard of.
JVM is implemented in C++, and as of JDK 16, C++14 is used.
Python is a versatile and beginner friendly language. The Python 2 to Python 3 migration took too long, and it somehow hurt the adoption and its popularity, but finally Python 2 was deprecated in 2020. Now Python is quickly gaining popularity due to the uprising of machine learning, or "data science". It is used in tools like numpy, pandas, Tensorflow, Pytorch/Caffe2, etc. It is competing with R in this area, however Python is also popular in other areas, like Django for web development, or scripts for automation.
CPython is the reference implementation, based on C.
The majority of the websites are powered by PHP. But don't be fooled. It is because WordPress is so popular for blogging, e-commerce, and content management, so smaller/long tail websites use it to skip the coding. PHP 7 got a big upgrade from PHP 5.x, but still I'm not convinced to invest my time in this language. Hack/HHVM is Facebook's version of PHP, but after PHP 5 is deprecated, HHVM would stop supporting PHP, and the two languages will diverge. Though open sourced, outside of Facebook, Hack's adoption is quite limited.
Companies are moving away from Ruby.
WebAssembly (or Wasm): A binary instruction format for stack-based virtual machine (browsers), intended to be faster to parse than
SQL is not the easiest language to write queries in many cases, however it is so widely used and supported, that's why in Hadoop system, Pig is dying but Hive and its successors/replacements are thriving, like Presto or SparkSQL. It is used in both online databases and data warehouses. SQL has its standards like SQL:2016, but no two engines are the same, each will implement a portion of the standard, and add some of its own features.
|V8 / Node
- Object-C is being replaced by Swift; similar to Kotlin replacing Java in Android world. And Swift and Kotlin are similar: http://nilhcem.com/swift-is-like-kotlin/
- C# and other .NET languages are only used in Windows; forget about Perl.
- Lua - a powerful, lightweight and embeddable scripting language that’s incredibly fast. All Lua actions start from C code in the host program calling a function from the Lua library. Lua is good for run inside nginx, in Redis, in games
- Fortran: a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.
Language vs Standard Libraries vs Other Libraries
New features / changes may be introduced at different levels:
- Language specs
- Standard libraries
- Extension libraries
- 3rd party libraries
The core specs to define a language, including keywords, syntax, etc.
Almost every language comes with a standard library.
Python has a large standard library. Mostly because it was born in the early 90s and Internet access was rare. Now there are many third-party libraries that are preferred to the standard library components, e.g.
Rust has a small standard library. Third-party libraries can be easily installed through Cargo.
Official libraries that extends beyond standard libraries.
import "golang.org/x/sync/errgroup" g := new(errgroup.Group)
- C++: every 3 years, C++11, 14, 17, 20, 23.
- Java: LTE version release every 2 years after Java 17.
- Rust: new
editionevery 2 or 3 years, with chagnes that break compatibilities.https://doc.rust-lang.org/stable/edition-guide/editions/index.html
It is interesting to see that major languages are adding the abstraction of "Modules", (to split code in logical units) though they may be designed and implemented in different ways.
C++20 introduces modules, a modern solution that turns C++ libraries and programs into components. An alternative to import header files. C++23 added module
In Go, modules were introduced in 1.11 and 1.12; Starting in Go 1.13, module mode will be the default for all development. A higher level abstraction of packages.
In Java, modules were introduced in Java 9
If you disagree with my assessment, here are some places to check the popularity rankings of the programming languages. None is 100% accurate though.
- TIOBE: update monthly, based on the number of web pages.
- PYPL: update monthly, number of searches for tutorial of each programming language. https://pypl.github.io/PYPL.html
- RedMonk: update twice a year, based on GitHub and StackOverflow
- Github's stats: Octoverse
- Google Trends.
- Githut: https://madnight.github.io/githut
- StackOverflow Survey: https://insights.stackoverflow.com/survey
PPL: Probabilistic Programming Language
4th Generation Programming Language
Domain-Specific Language (DSL)
Different from a General-Purpose Language (GPL), a DSL is for a specific problem. For example, CSS is just for styling web elements, SQL is for database queries, make for building programs.
Ruby, Scala, Groovy are especially good for building DSLs. E.g. Gremlin is a graph traversal language written in the Groovy.
High-performance computing (HPC) frameworks, such as OpenMP and OpenACC: provide application program interfaces (APIs) that programmers can use to express parallelism in code.
Informally this means that the destructor does not do anything, even taking member and base destructors into account. More formally it means that the type has no user-defined or virtual destructor and that all bases and non-static members are trivially destructible.
Foreign function interface (FFI)
A program written in one programming language can call routines or make use of services written in another.
In Java, it is called JNI (Java Native Interface) or JNA (Java Native Access).
Java foreign function:
Cgo enables the creation of Go packages that call C code. https://pkg.go.dev/cmd/cgo
- java string template https://openjdk.org/jeps/459
- go template