Developing on Linux

For a large part of my programming career, I’ve been developing on and for Microsoft platforms, first on Dos and then on Windows. During the Dos years (1986-1991), Linux didn’t exist and for the next twenty years I wrote software on Windows apart from a short spell where I tried Kylix; Borland’s short lived Delphi for Linux.

Thinking back, I wished I’d done more programming on Linux. It wasn’t until VirtualBox came along that I was able to do more.  All my useful development tools (Editors, graphics editors etc.) were on Windows so starting anew with a new platform was quite a steep learning curve. With VirtualBox, I could still use the Windows tools and copy/paste into Linux. It also saved having to get a 2nd Pc setup on a network then either log into it with a second set of monitors and keyboard or remotely using putty etc.
Below are some of the programming languages that work better on Linux than Windows. Though many languages are available on Windows, Linux and Max OS/X, some are definitely better on Linux and it’s those I’m looking at here. By better, I mean development is easier or there are more tools available. You’ll sometimes see cross-platform projects where someone has built Windows installers but the Linux version includes source code you can compile and build yourself.

C/C++

C was the original development language for Unix and remains that way for Linux, partly due to Linus Torvald’s dislike of C++. The main compilers used to be from GCC – the GNU Compiler Collection but nowadays this has been supplanted by Clang and LLVM. Clang is a frontend compiler for C, C++, Objective-C and Fortran, compatible with GCC that generates LLVM assembly language and is part of the LLVM project.

LLVM is a remarkable compiler infrastructure being not only the backend but also an assembly language that compilers can generate and then the LLVM backend emits optimised code for various processors. If you’ve ever fancied getting involved with compiler development, this open projects page for Clang lists various holes that need filled.

Python

Again cross-platform but many Linux distributions come with Python preinstalled. Now you just have to decide on Python 2 or 3. I recommend Python 3 unless you have a specific need for Python 2 only packages. Python 3 is generally better and has Unicode support but see what the official website says about Python 2 or python 3.

There are several Python implementations including the standard one (CPython), a faster version pypy and a free version from Intel who include over 100 popular packages optimized with the Intel Math Kernel Library for Linux and Windows.

Before you install any alternative versions, make sure you know how to use virtualenv. It’s a way of having multiple Pythons on the same Linux box without interfering with each other. Some installations don’t let you install new packages so virtualenv can help work round that.

Rust and Go

Mozilla’s system programming language Rust is simpler than C++ and guarantees safety, speed, and concurrency. Although cross-platform, it requires the Microsoft Visual C++ build tools to build on Windows.

Now in its sixth year, Rust is intended to replace C++ in writing system applications such as operating systems. Although it’s been 34 years since C++ first appeared, it’s only with a recent incarnation of C++ 11 that move semantics were added reducing the number of temporary objects that copying objects created. Rusts beats C++ in this respect as it guarantees thread safety and no race conditions. C++ isn’t so secure but there are tools to help detect race conditions.

Another language competing in the system development space as Rust is Google’s Go (aka Golang). This is another cross-platform language that is easer to install on Linux than Windows which requires MinGW for its GCC compiler.

Go is a somewhat simpler language than Rust and can’t guarantee avoiding race conditions like Rust can. In its favour is that it’s very fast to compile and has a very fast garbage collector. Rust OTOH does generics and can do garbage collection but mostly doesn’t need to. Given that Google is behind Go, it’s had a lot of take up. Which of these two will win out is hard to gauge. On the Reddit programming communities page, Golang has 20.7K users while Rust has 16.1K so not that great a difference.

Swift

The last language getting a brief mention here is Apple’s Swift which has been open sourced and is available on Linux/Mac but has not as far as I know had all the libraries necessary for full Linux development. That’s one to keep an eye on.

Conclusions

There are many more languages I’ve not included here such as Perl and Java because Perl has been in decline for a while, despite the recent release of Perl 6. As for Java, it’s still popular, especially on Android but you might do better learning Kotlin or Scala. The other one I considered is Julia and I will return to that in the future.

Post a Comment

Your email address will not be published.