In Stack Overflow surveys in 2018, 45.3% of respondents called Java the most popular programming language, and Kotlin preferred only 4.5% of developers. However, in May 2019, Google announced Kotlin as the priority programming language. The corporation did not call for abandoning C ++ and Java, but disputes between programmers flared up even hotter.
Netology learned from developers which programming language they use and how they see the future of Java and Kotlin.“The main thread will remain in Java, and Kotlin will be used for rapid development”
Dmitry Kachalov, Lead Programmer, Kelly IT SolutionsWhat languages ​​does he know. Initially, I studied web development languages, but at some point I wanted to do mobile development too. I began to study development for Android and mastered the Java language at that necessary minimum so that I could write the first applications, run on the phone, publish in the market. This was back when Kotlin just appeared and was not known to a wide circle of developers.
')
Which uses. Now when developing enterprise applications, I use Java. Many libraries are available for him, there are ready-made modules. In addition, Android Studio supports it so much that you can literally write one letter, and the code will be written for you. It is very convenient.
In my practice, there was no such thing as requiring knowledge of another language. Usually Java is enough, because it has many libraries and it is possible to perform any task in principle. The only thing worth considering is the limitations of the Android platform itself. Because no matter what the language, all restrictions sooner or later rest against the restriction of the platform. In my opinion, there is no big difference in which language to implement the task, the main thing is to find a good solution that will work within a specific platform.
Why prefers Java. On it you can make free services, your own API methods, write sites, servers, mobile applications. This is essentially a universal language in which you can do a large number of operations and develop different applications. To him there are many developments and libraries. And also - a large community that is always ready to answer questions and help.
On the confrontation and the future of languages. Kotlin is definitely an interesting step forward, but in my opinion, it does not carry any new approaches and paradigms. It simply reduces the time it takes to write code with shorter constructs. At the same time, it is still based on the same Java.
In the near future, Java will still be the most popular. The main thread will remain in Java, and Kotlin will be used for rapid development in the conditions of rapid prototyping of simple applications or prototyping. Although this is a very provocative point of view. Kotlin is compatible with Java, so you can’t say that something will fundamentally change.
“If you are a beginner and want to work with Android, learn Kotlin. Otherwise, I would choose Java "
Artem Pervushov, licensed Android ATC specialist, author of the Android Developer course program in NetologyWhy prefers Java. First of all, you need to understand what Kotlin is about. Kotlin is more about syntactic sugar. Do I need so much sugar? Probably not, I'm already used to reading Java code and not making mistakes (almost). Should a newbie in programming choose obviously more complex Java? Probably not either.
Still need to consider the benefits of investing your time. Java is a story not only about Android and desktop. There are a huge number of other projects on it. And if you want to go from Android somewhere else, knowing the language will come in handy.
About the future of languages. Maybe in the future Kotlin will take over the world, or maybe not. The "capture of the world" Go, Python, Ruby, JS, <substitute the necessary> is much less common than we are told by fans of these technologies. Therefore, my advice is this: if you are a beginner and firmly decided to connect your destiny with Android, learn Kotlin, it’s convenient and fashionable. Otherwise, I would focus on Java.
“Kotlin developers can use Java frameworks and libraries and write more understandable and simple code.”
Semyon Pilunts, Android developer, expert in the Netology courseWhat languages ​​does he know. My acquaintance with programming happened at my institute, I started with Pascal, I also studied Basic, QBasic. Already at the end of my school years I began to study C. I did not stop there and began to study other languages ​​- Javascript, VB 6.0, MS SQL, Java. He soon realized that Java was closest to me, so he decided to focus on it.
After a couple of years, by chance, I started using Java to create mobile applications for Android. Sometimes it was necessary to use Javascript, HTML, SQL in Android itself. Knowing other languages ​​always helps.
Which uses. I am currently working in both Java and Kotlin. So far, we cannot completely abandon Java, but we are gradually moving on.
In practice, before undertaking a task, you need to evaluate it, choose an approach and a way to accomplish it. Here it will become clear which language is better to use. In this case, there will be no situation when you can not cope with the task. At the same time, Kotlin developers can use Java frameworks and libraries and write more understandable and simple code.
Why Kotlin prefers. Using Kotlin is easier and more convenient than Java. In it, the program code is obtained on average 40% shorter. And it also allows you to prevent some errors that may occur during program execution. When the code is simpler and more understandable, errors are more difficult to make and easier to detect, so their number is rapidly decreasing. You spend less time developing and testing.
About the future of languages. I think in the near future Kotlin will be able to almost completely replace Java. Already, it covers the Android market by 50%, and this is only 3 years after the appearance. But still, Java needs to know, without it, it will be difficult to transfer the code to Kotlin. Here I note that Kotlin is fully compatible with Java, that is, it is not at all necessary to immediately completely rewrite the application. It is often more convenient to do this gradually.
And the development of Android applications is not the only direction of Kotlin. It supports JavaScript, programmers can transfer the frontend to it, Kotlin is great for developing server applications, allowing you to write short and expressive code, while maintaining full compatibility with existing Java technology-based stacks. Also, the creators have added Gradle support so that developers can write Gradle files on it. Actively is the development of Kotlin Native, with which you can create iOS-applications.
“Kotlin is not better than Java in general, but better in the Android world”
Ilnaz Gilyazov, co-founder of AIMS, author of the Kotlin Developer course in NetologyWhat languages ​​does he know. Initially, I learned several languages ​​as needed: Assembler, C / C ++, then Java, JS, PHP, Python. Since I worked and work in the field of information security, I can not stop in one language.
Which uses. Now I choose the tools depending on the tasks and preferences of the customer. For the backend - Java / Kotlin, for lightweight things without a lot of integrations - Go / NodeJS, for the frontend - JS / TypeScript + frameworks, for system things - C ++ / Go. That is, I take into account not personal preferences, but proceed from the task and capabilities of the language and its ecosystem.
Why Kotlin prefers. The advantages of the Kotlin language in a fresh look at things, in the desire to provide developers with simple and convenient tools that do not require a lot of code. These are syntactic sugar and coroutines. Kotlin allows you to write less code - it pleases.
On Android, choosing Kotlin instead of Java is obvious. In the world of backend, Kotlin’s position is much weaker, although even there he makes his way. The Spring Framework (which for many is the standard in the backend) includes chips for Kotlin that are not available for Java. This already says a lot. In the large and complex backend, we are still working in Java, although we use Kotlin in some places. In the case of microservice architecture, where a particular microservice does not require a large number of integrations, Kotlin feel great.
Kotlin is not better than Java in general, but better in the Android world. Although this can also be argued, it all depends on the parameters by which we evaluate.
On the confrontation and the future of languages. The confrontation between developers on Kotlin and Java is sometimes observed in projects where there is no general agreement and use both languages. And there are fanatics who believe in the only correct language. Otherwise, everything is more or less smooth, although roughness remains on integration issues. If you want to become a pro in Android, you will have to know both languages. Anyway, it’s worth getting used to the fact that you have to constantly learn new languages, libraries, frameworks, ideas and approaches.
Now the future of Java in Android is unclear. When we transferred all our Android projects to Kotlin, Java in Android got stuck at the seventh level with some chips from the eighth. And it is still unclear whether Google intends to resolve its disputes with Oracle and introduce support for new versions, or will dwell on its current positions. Therefore, investing in learning, using and supporting Java on Android seems to be at least risky in the medium term.
Kotlin, on the other hand, develops more or less predictably and provides wrappers that allow you to use all the modern features of the language, adds a number of amenities and capabilities specifically for development for Android. This is an important factor that affects developer satisfaction.
In the near future, I do not think Kotlin will replace Java. Rather, it will be able to coexist with Java, since it was originally oriented to this. It’s not worth hoping that most of the existing popular Java libraries will be rewritten in Kotlin. But you can write in Kotlin (having understood the nuances of Kotlin <-> Java integration, for example, reflection and all the pitfalls) and use libraries written in Java.
“Now no one is looking for a developer with knowledge of only Java or only Kotlin. You need to be a universal specialist ”
Dmitry Gordin, Android developer at RoadARAbout the confrontation. In order not to breed demagoguery and not be based on personal feelings, let's look at the major market players. First, Google recognizes Kotlin as the main development language for Android. Secondly, this is how vacancies on HH.ru from top companies look like:
- Tinkoff - “A significant plus: experience in developing applications on Kotlin”;
- Yandex - "Welcome: development experience on Kotlin";
- Redmadrobot - “Desirable: Kotlin development experience”;
- even Russian Post - “We expect the following knowledge and competencies from you: knowledge of the Android SDK technology stack, Kotlin / Java.”
About the choice of language. You need to know both languages. It is impossible to know Kotlin and not know Java. A boring league may find fault and notice that there is a Kotlin Native that is not Java related. But we are talking about Android development, which means the Dalvik / ART runtime. Therefore, all employers who write that they are looking for a developer on Kotlin are actually looking for both languages.
In my opinion, the best way is to get comfortable with Java, and then start to smoothly switch to Kotlin. Kotlin doesn't turn everything you knew from Java upside down. You can switch to a new language with minimal changes and write in the "Java-style", gradually kotlinizing your code, adding sugar and Kotlin-specific chips to it.
From the editors
We took into account the current situation with programming languages ​​and the opinions of the developers themselves - we teach Java and Kotlin on the course “
Android Developer from scratch ”. Thanks to this, students can choose which language to stay in the future, or use both.