Compiled vs. Interpreted Languages: Which Is Better for DevOps?
Interpreted languages would seem to be better for DevOps, but compiled languages have speed on their side.
![Compiled vs. Interpreted Languages: Which Is Better for DevOps? Compiled vs. Interpreted Languages: Which Is Better for DevOps?](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blta742f64e5134efb8/661ce61fc79dc4011da240bf/compiled_20vs._20interpreted_20code.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
In the age of DevOps, programmers are encouraged to prioritize speed, agility and visibility. In many respects, interpreted programming languages would seem to offer an advantage in this respect over compiled languages. In fact, you might argue that DevOps could eventually lead compiled languages to become obsolete.
Is that an overstatement? Let's explore the benefits and drawbacks of interpreted and compiled languages for DevOps programming.
Advantages of Interpreted Languages for DevOps
Interpreted languages--meaning those where source code is fed directly to an interpreter at the time of execution, rather than being compiled ahead of time--offer several benefits from the DevOps perspective, including:
Code access and transparency: Part of the purpose of DevOps is to enable seamless collaboration among all stakeholders. Interpreted languages do this by making it easy to access the source code. An IT Ops engineer who wants to see the source doesn't have to ask developers for it; he or she can look right at the application itself.
Agility: Interpreted code is easier to modify and redeploy because there is no need to recompile it each time you make an update. That's an advantage if you are doing continuous delivery and want to be able to issue new releases quickly.
Portability: Most interpreted languages are easily portable; you don't need to recompile your apps or make extensive source code changes for each operating system that you want to deploy to. This is also an advantage for DevOps teams that want the agility to target different deployment environments at will or migrate from one hosting infrastructure to another with ease.
Monitoring and troubleshooting: Arguably, it is easier to monitor and troubleshoot applications that are written in interpreted languages because data about application behavior and performance can be collected directly from the interpreter. This characteristic also improves visibility.
These advantages help to explain why Python, which originated in the late 1980s as a language primarily for boring system-administration tasks on the Amoeba operating system, has grown into a full-fledged, general-purpose language that runs almost anywhere. You could draw similar conclusions about Ruby, another popular interpreted language designed to improve accessibility and readability at a time when many other languages lacked these traits.
These languages originated before DevOps emerged in the late 2000s, of course. But I suspect that part of the reason why they remain so popular today is that they happen to be excellent programming languages for DevOps.
Compiled Languages and DevOps
All of this is not to say that compiled languages are useless in the context of DevOps.
Compiled languages still retain their biggest advantage over interpreted ones: speed and performance. Although modern interpreted languages perform quite well (which was not the case decades ago), in most cases applications written in a compiled language will still run faster and consume fewer resources. For DevOps teams concerned with efficiency and user experience, then, compiled languages offer at least one important advantage.
Some compiled languages that have debuted in recent years, such as Go, also lend themselves particularly well to modern application architectural and deployment strategies, like microservices and distributed environments. That's not surprising, given that these languages were designed in an age when these trends were already becoming important. But it does give them an advantage over the mainstay interpreted languages, most of which originated decades ago and were not designed with modern deployment techniques in mind.
Conclusion
So, which type of language is best for DevOps?
The answer depends on what matters most to you as a programmer. If having a modern architecture and optimizing the performance of your application is your greatest priority, a compiled language will probably be the best choice for you.
However, if having agility and visibility within the continuous delivery process is more important, interpreted languages are an overall better choice for DevOps programming.
Because both types of language have their advantages and drawbacks, I don't think we should expect one or the other to disappear anytime soon. But I do suspect that, as long as we continue to live in a DevOps-dominated world, interpreted languages will only grow in popularity.
About the Author
You May Also Like