A consensus opinion in computer science is that no perfect or most superior computer programming language exists. None. Many of those that take up programming early in their careers occasionally look into this from time to time. Others happen upon the topic while browsing a discussion board. In reality, the programming language you choose is primarily based on what is the most practical for your situation. If you are building computer programs for a business, non-profit, government agency, or other group, your goal can be stated as follows: The goal of the professional who builds computer programs is to build a program that reliably carries out those functions requested by the sponsoring party. That is all.
Your goal, when creating a computer program, is to create a program that works as intended, works consistently, with an acceptable error rate. The details that extend from this includes the extent of reliability, how fast the program operates, the amount of compatibility with the user’s environment, greater or lesser security, and amount program flexibility. It comes down to a matter of magnitude, scope, scale, time and necessary precision. In most cases dealing with businesses and IT departments supporting businesses, a desire to have a program in some finished form by a certain date and in a certain condition can influence how well these criteria can be addressed. A software company or a technical division of an engineering firm may have these same concerns in different measures and levels of emphasis. These are the trade-offs, among many others, in the programming process.
When you consider the generic goal of a program that carries out functions in a reliable way, nearly any programming language will do. It does not matter as long as the computer can understand the code the way you intend. If you read the Ars Technica article on programming, it describes the programming process of going from code to a program. A computer program file is in a format that the computer, not the human, understands. All computer programs are in this format. Computers do not understand English. English has to be converted to patterns that fit the movement of electricity through wires. All programming processes eventually produce this program file in the computer’s rather than the programming language’s format. A PHP web page does it when you access the page. A desktop program is already in the format. Unless the programming tool is broken or deficient in some way, they all create roughly equivalent programs. To a point.
The trade-offs in the programming process is what determines the best programming language for the situation. Some languages are great at allowing the programmer to produce a program in a short amount of time. Other languages allow the programmer to dig in deep into the machine to create programs that run very fast. Between the extremes of programming languages that allow you to build a program very fast or build a program that runs very fast are many other programming languages that balance these characteristics to optimize reliability and gain some amount of certainty.
Often times a person with less programming experience will ask someone with more experience in the software process, “which is the best programming language?” Answers vary. The correct answer is usually that there is none and it depends. The worst answer is typically based on either technical vendor marketing or preference to the language most used by the more senior individual. It generally comes down to the trade-offs relevant to the situation.
Still, there is about 50 years of programming language usage, history, and results that we can draw upon. This can be instructive as to the most suitable programming language for most situations. I will attempt to describe this here in a modest way. This is my own perception of which programming language is close to the ideal based on my understanding of computer languages in existence today as well as those languages found to be the most useful.
I thought about this topic again after encountering a series of articles recently about two of the most widespread computer languages. Thankfully, I do not use either of them professionally. I do occasionally conduct technical research on my own separate from my professional activities using these languages. While discussions surrounding them are not foreign to my experience nor completely relevant, they are nonetheless useful sources of understanding.
The Age Old Discussion – What is the Best Programming Language?
I came upon an article recently on Slashdot that had far less to do with programming languages and more about a group’s direction. However, the discussion about the main article easily diverted into the age-old discussion of what is the better programming language. A discussion as old as discussion boards themselves and just as widespread among many technology focused discussion sites. Anyway, the discussion was particularly illuminating. You can see for yourself on the Slashdot discussion about C versus C++ that wasn’t meant to be such a discussion.
As I browsed the comments, I noticed a number of external web site links among the discussion threads. A few of the notable ones were:
While writing this article, I did find some counterpoints to the consensus that seemed to be building in some parts of the Slashdot discussion:
Despite the points raised for and against, my own conclusion is that there does exist a universal programming language. This universal programming language does suffer from the shortcoming of lacking a fully self-contained library on the level of later languages. We can understand that while there does exist a universal programming language able to address nearly all areas of computer software development in theory, in practice, several of the other languages masterfully fill a gap in the shortcomings of this universal language. The value of the other languages are in their platform completeness, tools, and processes for completing a given type of software application construct be it web, desktop, tablet, data process or other kind. Yet, with this knowledge, we can place the other languages in context.
Programming Language Rankings
After seeing those references, it brought to mind a language ranking article from RedMonk that I had seen a few weeks earlier. I see these referenced in other articles from time to time but generally find them to be irrelevant to whatever process I find myself engaged. They are useful though in terms of where employment for those who provide programming services may be headed or the state of the technology industry. The language chosen can have an impact on the types of software produced or the substance of that software. Several official rankings of programming languages exist and can be informative.
As of December 2012, the TIOBE ranking shows that the 1970’s language (as I call it) reigns supreme with other places in the rankings occupied by languages from the early 1980’s through the early 2000’s.
The IEEE (of which I previously a member) has a 2011 article on popular languages. According to them, the most sought after language combination is PHP and SQL.
The Better Programming Language
Program Language Fitness to Purpose
You can categorize computer programs in several ways as I have done in the past. Generally, computer programs can be divided into a few categories: Programs for others that they use directly, programs for others that they indirectly benefit from, programs for yourself, and programs primarily for technical purposes. When considering the best programming language, it is often useful to consider the general program category.
Programs for others that they use and launch directly – This category of program is usually made up of one or more visual screens that you click-through, use your voice, touch, or wave a hand. In my experience, most people who sponsor program building want reliable programs delivered as soon a possible. In this case, programming languages that assist you in producing a program somewhat quickly with good reliability are going provide the best results for the programmer.
For businesses supporting their operations with software, languages for this category include Objective-C, PHP, Ruby, C#, VB.NET, Python, and Java are usually the best candidates for programming success. When targeting the Microsoft desktop, C# or VB paired with Microsoft .NET is usually the best option. Websites can benefit from either C# or VB with Microsoft .NET or PHP. Apple environments are usually best addressed with Objective-C through XCode. Android programs are well supported by Java. Linux environments benefit from any of these options.
Programs for others that they indirectly benefit from – These are those programs that people don’t see but that support the programs they do see. This is a far more diverse and numerous universe of programs than the ones that people directly interact with. The best programming language is going to depend on whether or not the delivery time frame for this time of program is connected to those downstream programs that people actually use. In other cases, certain technical requirements may mandate the use of certain programming languages. When running on Windows, C# and VB are the most often used languages for business. On Linux, the most often used language may be Python or PHP in terms of speed of building, good reliability, and straightforwardness of program maintenance. In some cases, you are better served by using Java, C, or C++ or a combination of the three depending on whether or not your objectives are commercial or more technical than would be suitable for general business processes.
Programs for yourself – Anything will do. Sometimes you must use C and/or C++ depending on your integration requirements (linking your program to another computer process of a certain type). This can come down to your own personal trade-offs such as how much time you will personally invest in your personal project, study, research or volunteer effort. It can simply be the trade-off of time for knowledge.
Programs primarily for technical purposes – These are technical programs that provide technical capabilities for technical people like other programmers, scientists (of various kinds), technologists, and engineers (of certain kinds). They may also be the technical foundations for downstream processes not considered to be strictly technical or technical focused. Software in a network router would be technical software, so would an operating system like Windows, OS X, or Linux. Certainly, the software that results in mirroring a mouse pointer’s movement on a table to correspond to a location on a screen is technical though it serves the interests of all visual programs even those that are more benign. The best programming languages in this case would likely be the 1970’s language. It has remained effective in this area considering the trade-offs it necessarily confers compared to more recent, IDE (integrated development environment) enhanced languages.
The Best Programming Language
The jury is still out on the best programming language because which programming language is best is generally scenario dependent. The software project tradeoffs and how a programming language meets the desired criteria can have a huge impact on how the software is made, delivered, received, and supported. In normal use, the criteria for a business, an IT department, an individual, a government agency, a non-profit, a commercial enterprise, a web site or desktop or tablet program supporting 3 people versus 3,000 versus 300 million all have different criteria and tradeoffs. A program that can afford to be correct 90% of the time is different from one that must be correct 100% of the time as to how you create such a program.
If you look at arguably the most important computer programs, operating systems, the software-based enablers for other computer programs, you can ask the question, what is the best language for creating an environment for other programs? In a related way, what is programming language most used for most of the technical digital infrastructure in general? Last, which programming language is used for some of the most demanding software of a complex nature? You can discover this through a vigorous search and examination of these kinds of software. The answer may or may not be surprising. Certainly, in a given era of time, I would vote that language as the best programming language. That language is clearly identifiable today, will likely be the same in 2015. In 2050, who knows?
What programming language should you use? Let us start with looking at the common approaches for 2012 and possibly 2013:
Microsoft Windows Business or Tablet Applications – You are best served by Microsoft .NET languages of C# and VB keeping with a managed runtime paradigm as much as possible. This is assuming that your program targets internal business operations or is a small to modestly sized web application.
When This May Not Work: The people of Evernote may have some ideas. They abandoned Microsoft .NET. when it was clear that it was the wrong tool for their set of tradeoffs. For IT departments, Microsoft .NET is a success. For building mainstream software, it is less so though attempts to change that with Windows 8 is underway. Runtime managed systems traditionally have excellent qualities for an internal business environment that may remain weaknesses for a diverse public environment.
Best Language? As to the languages in use, C# or VB .NET are bound tightly to the Microsoft .NET environment, they are necessarily ruled out the best languages overall.
Linux Business Applications – Python or PHP will generally serve you best for desktop or web respectively as they provide a good measure of productivity and reliability. In 2012, some may not have heard of Linux for Business. Some of the reasons for Linux in a business environment are available as is a book.
When This May Not Work: Commercial Linux applications may require a deeper skill set, depending on the situation, than that normally employed for internal business support using Linux. You might also encounter interface fragility. You will have to determine if depth of knowledge requirements compared to Microsoft is acceptable and whether you are prepared for a variety of issues based on your knowledge.
Best Language? Since Python can be unsuitable for certain kinds of processing and PHP has inherently higher latency than Python, neither are suited for consideration as the best overall language.
Apple Desktop and Tablet Applications – Objective-C has been highly optimized for that platform and will allow you to use a turnkey process for creating applications. Supports both business and commercial use at the application level.
When This May Not Work: Your environment consists of Windows servers and Mac Laptops and Mac tablets in which the IT integration components are not as mature or functional as their Windows counterparts. In this case, you may encounter app support efforts that undermine app support economics.
Best Language? While Objective-C is highly productive based on evidence of the many apps spun from its loom, it may contend for the role of the best language but falls short of achieving this since there are some things, at a system level, it may be ill suited for.
When This May Not Work: Your performance, security, or reliability requirements may not be well served by a stock Android version and you may have to more fully customize the Android environment to accommodate the overall criteria. Your desired software process completion time may be less feasible based on intended versus actual technical platform capabilities and time.
Best Language? Though Java is a great platform responsible for some of the largest and most critical software systems in the world, in some cases, it needs a little to a lot of help to reach the next level of either performance or hardware integration. It cannot stand alone and is inherently limited in some runtime contexts in terms of performance despite the narrowing of the performance gap. This and more makes it a reasonable replacement for the best programming language, but it is not the best.
All Platforms Desktop – If you are targeting all platforms at a desktop level, you have some serious choices. Those that build LibreOffice has some good advice but their approach is not the only way. Desktop is a generic term for native, tablet, or anything that can talk to the computer system more fully.
When This May Not Work: The time investment to support more than 1 platform can exceed normal measures for achieving productive development of software programs. Cost in terms of money and opportunities to optimize on a single platform can arise as well. It depends on your tradeoffs and understanding of realistic expectations. Remember that each vendor or open source group determines the particulars of their particular platform. Their choices can easily undermine future compatibility of your cross platform process on a given platform requiring a response from you that you may not have budgeted for in terms of time, cost, resources or all of the above.
Best Language? C++ is the heavy-weight champion of computer programming languages able to do everything and all things. The price can be quite high in some cases. One must consider it carefully when determining if it is the best language. It is possible that C++ is the most complete computer language, but I do not think it is the best computer language. The one size fits all may be its greatest weakness in terms of how it is structured to support all paradigms.
All Platforms Web – Using the web can be advantageous if not limited compared to desktop applications. You may want to consider C# or VB.NET in ASP.NET if you are hosting on Microsoft Windows-based servers. Use PHP or Java if using Linux/BSD/UNIX based servers. Microsoft Windows will cost more if you try to accommodate more than a few hundred to a few thousand users. Linux will cost less and allow you to meet hundreds of thousands to billions of users depending on how many machines you have to serve the web application.
When This May Not Work: You find that a web based interface, due to how it is separate from the overall computer environment may lack the deep hooks or even natural hooks available to a desktop or native mobile program that causes the functionality you can achieve with it to be a shallow version of that which is available in a desktop or native mobile equivalent.
In another vein, let us say you are targeting a specific environment but an atypical process. Or, perhaps you are targeting a less common environment, say, a Mars Rover for example. It could be that you are targeting a common environment but the common tools do not possess the inherent qualities to support the specific manner of building and capabilities in which you have chosen to build your software upon. You may have something technical to build or something general to build that you wish to pursue in a different way than the commonly used approach. This goes back to tradeoffs.
The best language today is C. Not C#, nor C++, and not Java, Just C, created in the 1970’s, this is the one language that generally supports all other technologies and serves as the foundation for all other software technologies in some form. The original Microsoft Windows API is in C and when you elect not to use Microsoft .NET but instead build desktop programs on Windows using native API, you are most likely using C though you may graft on C++ for certain premade functions. All the Linux, Windows, and Apple operating system cores are built using C and all the baseline API in these platforms are in C. The advantage of the C language is its versatility while remaining absent of the encumbrances of other languages, the downside of the C language for business and productive business application development is the lack of those same encumbrances for speeding up the creation of software or adding in facilities for making the software more reliable.
Consider that if you ever move in the direction of creating software with either C or C++ you will lack certain things that are available in some of the other languages and tools. C++ may be a more obtuse language than C, it does have an extensive set of functions such as the STL. C does not have such things and this lack of inherent capabilities compared to C++ may mean that you will have to undertake the creation of these things in a smaller, narrower, and more specific way than exists in C++. Other comparisons in which C++ is considered over C are abundant. Whereas in C#, Visual Basic in .NET you have extensive APIs for a wide range of functions in a consolidated collection of DLLs that you can reference and discover to accelerate the creation of the overall software you are pursuing, you will lack this same level of discoverable configuration in C or C++ programming. This means your productivity may be far less and stalled at times. compared to navigating an API through IntelliSense. Similar comparisons can be made to Java or Python as to C and C++.
Of course, between C and C++ are probably the majority of critical software bugs, security flaws, and design flaws in software in general. The state of the art in the 1970’s in terms of what was understood about safe, secure, reliable, predictable systems was far less understood then than today. Indeed, many of the discoveries about what works best was likely founded in these languages that lead to the creation of better languages such as Java, Python, C#, and Google’s Go language. Despite the problem of C and those problems that C++ inherited and pushes forward, C is the ultimate computer language as it is the genesis of most other software.
Google Go, however, may eventually replace C particularly given that one of the individuals who was involved with or influenced C itself is directly involved with Google Go. The ascendancy of Google Go remains to be seen and is is likely many years away if at all. As it concerns C, C is invaluable to computer software in general but largely unsuitable to the common approaches to software in use today for building business applications in the IT department or web applications powering the web. A majority of web application developers never have used C nor have a substantial number of desktop developers using Microsoft .NET, Objective-C, or Java have even had the need to apply it. It is unlikely Google Go will change this but if they are successful, they will replace C and perhaps expand hardware native software development in the process with a language that does what C does but in a better way.
Until then, the common approach may be better for most situations. Yet, you may have a need to simply emphasize a given technical or functional characteristic not well supported by the common approach or common tools outside of C or C++. Perhaps you are inclined to use the common tools of .NET, Java, Python, PHP, or Objective-C but in one particular situation, you are well-informed to use a different process such as creating an operating system or the heads up display for glasses, a car, or aircraft. This is where your choice of language, tools, and production processes are based on how well they support your criteria for performance, support, security, reliability, and necessary time investment versus time of availability. In cases like these, it is the best language that will likely be the answer while in other cases, it is less helpful due to its strengths and its weaknesses.