Programming languages come in two major flavours -- those which are run directly from the source code as written (interpreted or scripting languages) and those which are first passed through a process which renders them in a form that the computer can execute directly (compiled languages). We have previously discussed some of the scripting languages and in this article we'll tackle some of the more common compiled languages.
What languages will you find
On an average Linux-based system (or BSD for that matter) you will find a lot
of code written in the language called
C. Indeed the Linux
kernel and most BSD kernels are written in C. Most of the core operating
system utilities such as
ls etc are likely written in C unless you're
on a very odd operating system.
C is considered the canonical programming language for UNIX systems and it's recommended that everyone who writes code on UNIX be aware of and familiar with C, even if you do not actively program in it on a day-to-day basis.
Many manual pages for system calls etc are written with their examples in C.
In 1979, Bjarne Stroustrup started work on a new programming language which was eventually called C++. C++ adds a lot of new syntax and semantic elements to the language of C and these days is considered an entirely separate language which happens to have some similarities to C. C++ is favoured by some large projects run by people who subscribe to the object-oriented programming paradigms very strongly.
C++ is favoured by many GUI authors. The toolkit Qt is written in a meta-language built on top of C++. Then the KDE is written on top of Qt and as such is written in C++. C++ is also favoured on Windows since it's Microsoft's chosen systems programming language.
Objective C marries the C language with some of the properties of the Smalltalk syntax and semantics. It is favoured by object-oriented programmers who don't like C++ but want more than C provides by default. The GNUStep project is written mostly in Objective C. Objective C is also favoured on the Mac OS platforms (Mac OS, Mac OS X and the various iOS variants).
While Java is, strictly speaking, a compiled language it has similarities to scripting languages in that the compiler targets a virtual machine rather than the underlying machine code of the computer it is to run on. This forms the basis of Java's claim of "Write once, run everywhere".
Java is favoured by enterprise programmers and can also be found as the language underneath Android applications. Tools such as the Jenkins CI controller or the Eclipse integrated development environment are written in Java.
Many people think C# is just a Microsoft
.NET language, but with the
mono toolchain, the "Common Language
Runtime" is available to more than just Microsoft platforms. At one point
mono was very popular for writing GTK+ based desktop applications such as
An increasing number of small utilities and tools are written in a language, invented by (among others) some Googlers, called Go. Go is gaining traction among systems programmers who, jaded by C++, C# etc are drawn to it by the language features seemingly designed with them in mind. While there have been a great many projects written in Go, none of them seem to be mainstream applications at the time of writing this article.
Haskell has been around for a long time, but is only recently gaining traction as a full-power systems programming language. A surprising number of tools available on a modern UNIX system are written in Haskell. Perhaps the most well known of which are Pandoc by John Macfarlane and git-annex written by Joey Hess.
Other compiled languages
There are many many more compiled programming languages such as:
Explore the wonderful world of compiled languages and marvel at the range and variety of syntaxes all of which are meant to compile down to the same kind of machine code.