M
M
Montgomery2020-07-22 11:57:58
Android
Montgomery, 2020-07-22 11:57:58

Which programming language is better for writing Android applications: Java or Kotlin?

Tell us which of these two languages ​​you have chosen for mobile development and what your choice is based on. Yes, I understand that the question is quite philosophical and you can answer "yes, what is convenient for you", but I'm interested in specific pros and cons in relation to each language due to architecture, frameworks, integration, etc.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Developer, 2020-07-22
@samodum

Two things must be taken into account: thousands of tons of code have been written in Java, and orders of magnitude less in Kotlin, this is a new youth hype language.
Personally, I would prefer the time-tested Java. Kotlin is already having problems.
Advantages of Java:
- established mature language
- huge community, formed over 30 years
- 80% of the code for mobile phones - in Java
- easier to maintain, easy to understand someone else's shit code
- pure OOP, not FP
Java cons:
- sometimes there is an overabundance of code
Pros of Kotlin :
- less code
- easier to write
- all hype shit offices are moving to Kotlin
- they prefer to write new code in Kotlin, but you need to know Java to support old code
Disadvantages of Kotlin:
- functionality
- complexity of support. It is difficult to understand someone else's shit
- a lot of libraries go into oblivion, and a lot of code has already been written. A prime example is Anko
5f189fcd42b7f878306369.jpeg

A
alekseyHunter, 2020-07-22
@alekseyHunter

Annotation : First I wrote in Java, then I switched to Kotlin. These are the eternal pros and cons ...
Pros of Kotlin :
1) You can write classes in 1 line, without the obligatory get / set. (In Java, one class is 100 lines long).
2) No commas (Less careless errors).
3) Expanded support for functional programming.
4) Android Studio automatically converts files from Java to Kotlin (sometimes incorrectly).
Disadvantages of Kotlin :
1) Little information on it.
2) You get used to other PLs, you forget to put ";".
Advantages of Java :
1) There are all solutions to problems that arise when developing an application (StackOverflow).
PS: Learn to google, there are hundreds of such comparisons on the Internet

S
Sergey Vodakov, 2020-07-22
@WaterSmith

The question is so holyvarny that it was better not to ask.
In mobile development for Android, you need to know both Kotlin and Java, and it would also be nice to have Dart with Flutter, simply because it is in demand in the labor market.
But if everything is vague with Flutter, then Kotlin and Java are needed together.

K
kamikaze3113, 2020-08-03
@kamikaze3113

The answer is very simple, you need to know both Kotlin and Java
. many solutions, ready-made code in java, it will be possible to translate this ready-made code into kotlin + google the company is mysterious today they like kotlin tomorrow they have the X language after tomorrow something else and they definitely won’t refuse java because the store will be empty.
PS this is my opinion!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question