The tech industry is in constant search of faster, better development tools that can support more complex solutions and can be scaled easily. Over the last few years we’ve seen a surge in new programming languages for both domain-specific and cross-platform applications. We recently published an article about the ten most popular programming languages, but today we want to focus on three new ones – Swift, Kotlin and Elixir. We’ve decided to talk in detail about these three languages because they’re in growing demand and are quickly developing.
In our article about moving your app from Objective-C to Swift, we already mentioned some of the features that make Swift so popular among developers: it’s faster than its predecessor, it’s more compact (less code for the same result) and it’s easier to work with because it’s a higher-level language that more closely resembles English.
There are two factors that usually dictate the speed at which a programming language develops: the presence of an active community of developers working in the language, and commercial support for the language, including regular updates from a well-established company. Swift gained a lot of momentum because it has both: Apple is very interested in updating and improving Swift as their primary programming language; and Swift as an open source language has a strong developer community that also provides a lot of valuable input.
We wanted to get a sense of how industry leaders feel about Swift’s future development and prospects, so we talked to Nick Lockwood, who is a leading iOS developer and author of many popular open source projects including iCarousel, iRate, and FXBlurView.
Here’s what Nick had to say:
Swift is in its infancy, but it's already proven a viable platform for getting real work done. Atypically for the company, Apple has been very open about their roadmap for Swift, so we don't really have to guess where it's going; they've already told us that in the next 2-3 years Swift should achieve ABI (Application Binary Interface) stability, which means that it will become possible to ship apps and frameworks without bundling the entire Swift runtime. So far this has been the main thing holding back big apps like Facebook from adopting Swift.”
Nick also mentioned that it’s very likely that Apple will work on smoothing out some of Swift’s rougher edges and work on eliminating issues like limitations in the type system and the complexities of dealing with numbers, strings, and regular expressions. These changes will help cement Swift as a viable language for server-side development, which is typically the domain of slower, interpreted languages like Ruby or Python.
We also asked some questions about the future of open-source languages like Swift to Matt Luedke, who is currently a mobile engineer working with iOS and Android development at Exygy in San Francisco and an active GitHub contributor.
Matt has a similar opinion about what to expect from Swift and how important the support of the community is for the success of any programming language:
“In a general sense, I get the impression that Swift is being treated somewhat as an Apple product, meaning they see it as having marketing value and see developers as ‘users.’ A wise designer prototypes their product, researches and builds empathy with user needs, and iterates. The same goes for developers as users of a language. I think this wasn't as much a focus with previous languages, which seemed more like academic exercises.”
In Matt’s opinion, Apple will also, in the short term, be working to make Swift developer-friendly by paying attention to how developers actually code and designing the language to minimize problems and maximize comfort.
Another language that is often compared to Swift in terms of its syntax and user-friendliness is Kotlin.
Kotlin, created by JetBrains, is not a dynamically typed language, and its static types are often seen as its advantage and disadvantage at the same time.
Dmitry Jemerov, chief technology officer at JetBrains, says that Kotlin is an ideal option for those developing something large, complicated and performance-critical. In his interview with InfoWorld, Dmitry names an example of a product that can directly benefit from Kotlin’s features – a high-frequency trading application.
Many developers who have already tried out Kotlin for commercial app development agree that there are three things that make this programming language particularly good:
What about Kotlin’s prospects?
Kotlin’s creators say they understand that Java will likely be the most common language in the market for quite a while yet, but they wanted to present the developer community with a new statically typed JVM-targeted language because they felt there was a high demand for such a language among developers.
Matt Luedke, when we asked him about his impressions of Kotlin, said the following:
“I appreciate its similarity to Swift in its user-friendliness, readability, helpfulness with common problems, etc. I like the emphasis on using types to catch errors and warnings earlier at compile-time; to me that's great.”
There is a general perception that strongly typed languages might be more rigid and have more limitations compared to more dynamically-typed languages. However, not everyone agrees with this idea. We talked to Dmitriy Malets, senior Android developer at Techery, innovative software development company, about his experience with Kotlin:
“For me personally, static typing in Kotlin is a useful characteristic: you can always expect to see a specific type in each part of your code instead of searching the chain of type changes for this specific variable. This makes code much easier to read.”
“ Most new languages seem to be focused on solving issues in the older languages that developers have had difficulty with over the years. A good example of this tendency is how Kotlin is solving the null pointer exception issue. Kotlin’s rigid typing actually helps to prevent issues like null pointer exceptions. One of the biggest selling points of Kotlin for me personally was the fact that all the different ways to run into a null pointer exception can be clearly described in the documentation.”
Enrique López Mañas, Google Developer Expert since 2013 and a freelance mobile developer, also thinks Kotlin is convenient even when you have to interact with dynamic languages.
The main disadvantage of using Kotlin instead of Java is the current lack of support for Kotlin.
Dmitriy Malets also mentioned how he finds it somewhat strange that Kotlin hasn’t been receiving as much support as you would expect for a programming language that has a fast-growing community:
“Despite significant growth of Kotlin’s developer community, Google doesn’t support Kotlin as an official programming language for the Android platform, and as a result Kotlin can’t evolve as fast as some other languages do in similar situations.”
Fábio Carballo, the lead Android Developer at Hole19, also talked about his company's experience with Kotlin, and what in his opinion is Kotlin's adavantage if we compare Kotlin to Java:
"For us at Hole19, Kotlin has one huge advantage over Java which is how easy it is to add behaviour to third-party classes (as in the Android API) by creating extension functions. That allows us to create quick and super useful methods that make developer's life easier. One other plus on using Kotlin is how it is “immutability first”and how it invites you to start programming without null-types. Since we adopted Kotlin in early 2016 we have noticed how our development got faster and with more quality due to the nature of the language. Other great thing that is barely mentioned is the ability to use Spek, which is a BDD testing framework on Kotlin that despite being on its early days, it has huge potential. Regarding the future, we will have to wait and see how Google will position itself regarding the language. However, I can see the Kotlin fanbase growing day by day which could help Google to get on our side."
Everyone we talked to – including our Yalantis Android development team – agrees about the big picture: it’s too early to tell what the future holds for Kotlin, but how successful and bright its future may be depends on whether Kotlin will at some point be recognized by Google as an official programming language for Android.
The influence of the developer community shouldn’t be underestimated, however; Kotlin relies heavily, as do other open-source languages, on comments, feedback, and help from other developers and from contributions to GitHub.
Erlang and Elixir
We’re growing more and more used to being online at all times as 4G internet (and soon 5G) spreads across the globe at a fast pace. This constant connectivity has habituated us to messenger apps like Whatsapp, which have become part of our everyday routines. But the technology behind these seemingly simple messenger apps – and in particular, the programming languages that make them possible – has gone a long way since the first messengers were created.
Erlang, a programming language used to build massively scalable real-time systems, has been around since the 1980s, when it was created at the Ericsson Computer Science Laboratory. It’s widely used in banking, e-commerce and, most commonly, telecommunications solutions. Erlang is reliable and supports hot-swapping – in other words, hardware updates can be installed while the software is still running – which is crucial for applications that can’t afford to “stop” for an update, such as telecommunications systems. But being the pioneer has its own disadvantages: because Erlang has been around for so long, it eventually got to the point where other, newer programming languages had developed certain features and characteristics that Erlang lacked.
Developers note that things like package management, meta-programming, and web frameworks aren’t as straightforward in Erlang as in other languages such as Ruby.
This was José Valim’s primary motivation to design Elixir, a brand new programming language that operates on the Erlang virtual machine and can be used with existing Erlang libraries without losing any quality of performance.
What are Elixir’s advantages?
Elixir combines the beneficial characteristics of Erlang (such as concurrency) with syntax that is more user-friendly and reminds of Ruby syntax in many ways.
Concurrency is a big deal these days because the current hardware trend is to create multi-core processor units (CPUs) to improve performance. Concurrent languages resolves the issue of end users waiting for a response because the software can only process so much data at a given time.
This is what makes Elixir so good for scalable solutions like online banking and telecommunications where a lot depends on an instant response.
At the same time, many developers feel that most of what Elixir offers already existed in Erlang. We wanted to know how developers feel about Elixir’s functionality and its future, so we talked to Alex, a senior developer with more than 7 years of experience working with Ruby and Elixir:
“There is clearly a growing interest in the Phoenix Framework – a web development framework written in Elixir that implements the server-side MVC pattern. I can see two major reasons for this growing interest: the general popularity of functional programming and a growing demand for apps that have interactive functionality – such as notifications and chat – that has to be available in real time. These features are implemented within the Phoenix Framework itself.
It’s important to understand that Elixir is not a fully independent language per se; it works on the Erlang Virtual Machine, and the majority of its features were already present in Erlang. There is a real hype around Elixir right now and I think its popularity will be growing in the near future. Support from the Phoenix Framework should make it possible to compete with similar functional languages such as Google’s Go.”
It might be too early to make long-term predictions about how Elixir will evolve, but there is interest in the developer community, and the support provided for the language by the Phoenix Framework makes us feel like we’re going to be writing about Elixir a lot in the future – especially since our web team here at Yalantis is eager to continue using it in our projects.
Looking at all three of these new languages – Swift, Kotlin and Elixir – we can see that even though there are a lot of differences among them, the future of each depends on two major factors: the commercial support of tech companies and industry leaders such as Apple and Google, and the support of the developer community.