A Programming Lingua Franca

One of the aims of this blog is to include mini-projects that illustrate the aspects of programming I find interesting. In accomplishing this, I want to be as inclusive as possible. Hopefully, the average developer can follow along with ease. Thus, I need a programming language that the majority will find comfortable. I am not seeking the best nor the most popular, but rather one that encompasses the majority of developers. The quest will be an attempt to find something akin to a Programming Lingua Franca.

This post will take the reader along the path I followed in reaching my final selection. People choose their programming languages for a variety of reasons. Maybe out of a desire to learn, a need to address performance issues or perhaps to make their task easier. What then do I want from a Programming Lingua Franca? It should be a language familiar to many people, but at the same time alienate as few as possible. To be sufficient in exploring any programming problem a bit like the legendary pseudo-code of academia. While this search may be subjective, I believe it will still achieve the overarching goal of choosing a programming language for the blog. Let’s begin.

Python

Python is a popular choice for teaching people how to code. Its unique selling point has been the use of indentation to define its scope-rules and in providing a comprehensive function library. Python long ago left behind its scripting roots, becoming the language of choice in many domains, especially scientific computing. The latter is due to the quality of its libraries rather than performance which has never been a strength.

While Python continues to rise in popularity, it has yet to see a majority adoption. The braceless style, while one of its strengths makes it different from the other popular languages. These other languages have tended to stay closer to their C-lang roots. I feel this difference makes Python too idiosyncratic for consideration as the universal programming language. A majority of programmers may find its style uncomfortable.

# Python code fragment
loopSum = 0
for i in range(0, 10):
    print(loopSum)
    loopSum = loopSum + 1
print("The result = {}".format(loopSum))

For a more complete example, visit the learnxinyminutes Python page.

Java

Java is another popular language also taught at colleges. Initially designed to be written once and run anywhere, Java offered the promise of portability. Like Python, it is a general-purpose programming language, but one that has seen more professional use in mobile development and on servers. Its style is certainly more traditional than Python. Java offers good performance and is relatively painless to learn.

People have criticised Java for being verbose, but I don’t consider that an issue. For me, the only downside is that it forces an object-oriented (OO) style upon the practitioner. This is fundamental to the language, providing many of its benefits. However, I believe a universal language should not dictate any particular style of programming. Not everyone utilises an OO approach and such people may be overlooked with Java.

// Java code fragment
int loopSum = 0;
for (int i = 0; i < 10; i++) {
    System.out.println(loopSum);
    loopSum = loopSum + i;
}
System.out.println("The result = " + loopSum);

For a more complete example, visit the learnxinyminutes Java page.

C/C++

C & C++ have been the core of application & systems programming for several decades. Most major operating systems, desktop applications & games are written in them. If you had to develop ‘serious’ software then these were the languages of choice. Even today, C provides the benchmark you compare against for performance. Correspondingly, they have historically enjoyed significant popularity and many developers remain familiar with them. 

Although I group them, these are two languages that have gone their separate ways. While C has changed modestly over the years, C++ has been morphed almost beyond recognition this millennium. This decade has seen an update every few years. Its complexity is such that some claim there are only a handful of people who know the language fully. Moreover, it requires a significant toolchain to make even the simplest of programs. These do not represent the qualities that we want from our Universal Language.

In comparison, C comes very close. In the late ’90s, it would have been a clear choice, but I fear its selection would alienate our newer developers. On reflection, these are not beginner-friendly languages, but rather rites of passage.

/* C and C++ code fragment */
int i;
int loopSum = 0;
for(i = 0; i < 10; i++) {
    printf("%i", loopSum);
    loopSum = loopSum + i
}
printf("The result = %i", loopSum);

For a more complete example, visit the learnxinyminutes C Page or C++ page

JavaScript

We arrive at what in my opinion is the only real contender for a Programming Lingua Franca; JavaScript. Web development has placed this language at its heart, especially in recent years. This has exposed the language to an extraordinary number of developers. A 2016 survey announced that:

JavaScript is the most commonly used programming language on earth.

Stack Overflow 2016 Developer Survey

From this quote, we can assume that crucially it is a language known by most developers. Furthermore, the main programming methodologies are all supported: Procedural, functional and object-oriented. Another advantage is that JavaScript can be written in a comfortable style for developers with a background in other C-lang derived languages.

With JavaScript, one need not look far for its detractors. Some decry its lack of proper classes or prototype-based inheritance. Others dislike the lack of typing or perhaps raise the spectre of callback hell. In my experience, all programming languages contain their issues. Upon closer inspection, these are often overstated. Regardless you may not always have the choice and so its good to be able to write effectively in any language.

My experiences with JavaScript

My own experience with JavaScript started many years ago when I replicated the browser toolbar within a webpage. Despite utilising JavaScript for several projects, I didn’t find it’s performance satisfactory. The last decade has witnessed a determined effort to improve this aspect of the language. When combined with Node.js, JavaScript can now be considered viable for most kinds of application; even on the desktop. Visual Studio Code (Atom) represents an impressive example of what is possible with JavaScript. It is also one of the most usable IDEs currently available. It is a case where the functionality transcends the technology employed. Now, I am more than happy to use JavaScript for the projects within these pages.

var loopSum = 0;
for (var j = 0; j < number; j++) {
    console.log(loopSum)
    loopSum += j;
}
console.log('The result = ' + loopSum)

For a more complete example, visit the learnxinyminutes Javascript page.

Final Thoughts

JavaScript is a language for many things, and one that has the most programmers are familiar with it. For this reason it perhaps the closest thing that exists to a Programming Lingua Franca. That is not to say it is the most popular or most capable language. But it is widely known. This makes JavaScript an excellent choice when trying the reach the broadest audience and good selection for the blog.

Naturally, there will be times when another language is required. For example, if discussing WordPress development one would expect to see PHP. Alternatively for WebAssembly, Rust may be the correct choice. In this way, domain specifics will often force the selection of the language. Allowing for these times, JavaScript will be the language of choice.

Further Reading

To quickly scope out an unfamiliar programming language, I highly recommend Learn X in Y minutes.

Updated Nov 2023

I included a new header image.

Notice

The header image was AI generated by Microsoft Designer.

Leave a Reply

Your email address will not be published. Required fields are marked *