Ask any knowledgeable developer to name the first programming language they would associate withLinux, and he or she would likely answer C, given the closely aligned history of Unix and C.
But in the 24 years since it first appeared, Linux has probably been home to every programming language known to humankind: Not just obvious languages such as C, C++, Python and Java but also C# (Mono), Fortran, Pascal, COBOL and Lisp and many more.
Check out the latest Linux jobs.
In a December 2014 survey, readers of Linux Journal placed Python at the top of their list of best programming languages (30.2 percent), followed by C++ (17.8 percent), C (16.7 percent), Perl (7.1 percent), and Java (6.9 percent). Those rankings have remained largely unchanged over the past few years—unsurprising, considering the Linux world is a rather conservative place. (One language rapidly moving up Linux Journal’s list is Google Go: It jumped from 1.8 percent in 2013 to 2.4 percent last year.)
Unlike Windows with its built-in GUI, Linux leverages whichever GUI toolkit you use (e.g., Ot, GTK+, wxWidgets) unless you limit yourself to terminal programming. Of course, not all Linux development requires a GUI: Think of servers or daemons, which are Linux’s equivalent of Windows services. So let’s look closer at each of Linux Journal’s top five languages in order to assess the strengths and weaknesses of each for Linux development.
Python and C++
Developing AAA games and High Performance Computing (HPC) is where Python hasn’t done so well. C++ currently dominates those spaces, with Python having notably little impact on mobile development other than in open-source. I’m not sure we’ll ever see AAA games development switch to Python but it’s certainly making inroads into the HPC arena. (I like C++ but attaining expert programming knowledge in it seems to require being a full-time developer; compare that to Python, which can be picked up by young children.)
C is as close to the metal programming as you’ll ever get unless you code in assembler; Linus Torvalds lists this closeness as a reason why he likes it. It’s simple to learn, and once you master pointers, you can do pretty much anything. However, you have to write a lot of code to do things that come standard in other languages; string handling in particular is tedious and error-prone. For low-level coding, C is hard to beat and there’s lots of software written in it (probably much more so on Linux, which is largely written in C).
For many years Perl—described by many developers as the “Swiss Army chainsaw” of scripting languages—was the language for sophisticated text processing scripts, and came installed on Linux/Unix like systems by default. It’s been around since 1987, with a massive install base to match: According to the ever-reliable Wikipedia, the Comprehensive Perl Archive Network (CPAN) carries over 140,776 modules, by more than 11,804 authors, and is mirrored worldwide at more than 250 locations.
Despite (or perhaps because of) Perl’s age, languages such as Python, PHP and Ruby have gradually come to replace it. But don’t expect it to go away anytime soon.
Linux has always seemed like the natural home for Java, at least with regard to server-side technology. The pattern of client-side Windows applications talking to Linux Java servers is a common one and very popular in enterprises. The Java JSP Web server technology hasn’t come close to PHP or ASP.NET in terms of adoption rates, but you can find (often expensive and resource-intensive) JSP Web hosting. Java powers many Internet game servers, most notably Minecraft.
At less than five years old, Google Go has gained its share of admirers; Google, Dropbox and other companies use it for their respective internal systems. With an easy-to-learn C-like syntax, it compiles and executes programs very rapidly and makes writing concurrent code a lot easier than a multithreaded approach. It comes with an extensive standard library that’s complemented by many third-party libraries. Although it’s a general-purpose programming language, it’s strong as a systems language, and useful for implementing Web servers.
All programming languages are just tools to help solve programming problems, and the choice of which to use is often determined not by the languages’ strengths but completely unrelated factors such as available hardware, internal politics, previous experiences and the like. Linux hardware varies from simple, low-cost systems to million-dollar “Big Iron” mainframes… But irrespective of the cost, it will run any of these languages.
Meet Google MeetNovember 22, 2021
Multi-Skilled AI and Human-Like IntelligenceNovember 21, 2021
Why is Levi’s Stadium the Most High-Tech Sports Venue?November 21, 2021