Ballerina: Why a New Programming Language
We all know Ballerina is a new programming language intended for network distributed applications. While it has all the aspects of a general purpose programming language, it also has some special aspects related to network distributed applications.
But the follow-up question almost everyone has in mind is,
Why do we need another new programming language when we already have many ?
Well, if you have the same question, this could be the right article for you. In this article I will be explaining why we need a new programming language.
1. The World has Changed
The New Norms for Network Distributed Applications
Nowadays, with millions of APIs, it is common to write applications which consumes these APIs over some sort of a network. On the other hand, it is common to write new APIs which expands the grid of existing APIs. Either way we are talking about communicating over the network and communicating over the network has its own complexities. For instance, you need to think about security, observerbility, resiliency, message types, transactions, concurrency and the list goes on. In other words, writing production ready network distributed applications is hard.
You Write It, You Own It in Production
Also, nowadays, it is not just about writing some application but it is also about how fast you can deploy it in production. In other words it is about being agile and that is why people talk about micro-services and stuff like that. In fact, organizations are re-organizing the teams to support this agility. Such that, the team that write the application is responsible for testing and deploy it in production as well.
The New Need for the Right Tool
One of the key differences between cavemen and us is the tools we use. Tools have been evolving over time for the betterment of mankind and now the time is ripe for a new tool to write network distributed applications.
2. Adapting to Change
WSO2, a company who has been dealing with network distributed application for many years, saw the change is coming and wanted to do something about it. They formed a small team with a bunch of unhappy engineers who wanted to make writing network distributed application fun and easy. This team have been trying out so many different things for years until the project evolved into a programming language. Now, the team has grown and the project is settled as a programming language and we call it Ballerina. Is everyone is happy now ? NO. Tradition of being unhappy continues to this date and everyone continues to try out different things to make it better. As it turns out the fun part is trying to figure out all the different ways to make writing network distributed application fun and easy.
3. Ballerina — A New Programming Language
Ballerina is a new empowering tool for people who have to deal with aforementioned complexities related to network distributed applications as well as complexities related to being agile. Ballerina includes several aspects to handle these complexities right from the inception of the programming language. As a result, Ballerina can help you to write correct, robust and secured network distributed applications with minimal effort and deploy it in production as fast as possible. In other words, Ballerina improves the entire development experience from the beginning to end.
Hmmm, I Can Do the Same Thing with Existing Programming Languages
Of course, you can do the same thing but the experience will never be the same. Let me explain with a simple analogy. Suppose you are a footballer (soccer player) and given three different types of balls to play with.
Now, technically, you can play the game with any of these balls but the experience would never be the same. Suppose you’ve been asked to play football with either a tennis-ball or golf-ball, you would encounter with many problems such as injuries, inability to do long passes, difficult to head the ball, etc. That is why you need a football to play football. Then only you can be accurate, efficient, agile, etc, as you wish to be.
Similarly, you can try writing network distributed applications with existing programming languages but your experience will be constrained by the tool itself. On the other hand, Ballerina will let you break your shackles and be accurate, efficient, agile, etc, as you wish to be.
Okay, There are So Many Libraries to Improve My Experience
Well, let me use the same analogy, say you took some string and swirled around the tennis ball to make it look like a football by increasing the size as in the below picture.
But still would the experience be the same as using a proper football ? of course, you might be able to improve the experience compared to using a pure tennis-ball. For instance, there will be less injuries, long range passes are possible, can head the ball, etc but still it is not the same. You will be less efficient, your skill set will be limited, you will be less accurate, etc.
Similarly, taking some existing language, writing some libraries around it and trying to make it suitable for writing network distributed applications will never give the same elegant experience that Ballerina could offer.
Conclusion
Ballerina is not just a new programming language with bunch of new features. Ballerina is a new innovation intended to change the course of network distributed applications. If you are type of a person who has to deal with aforementioned complexities everyday, then Ballerina is the right tool for you.
To try out Ballerina visit ballerina.io. If you want to start contributing to Ballerina here is the code base.