B
B
Bartar2016-08-02 14:01:40
Java
Bartar, 2016-08-02 14:01:40

Should a beginner learn Kotlin. Scala?

The question is "nubian", but if I'm a beginner and I'm going to write programs for myself, and not look for a job, is it worth learning the languages ​​mentioned above instead of java? In particular, what is the difference, or rather the reasons for the appearance of these languages, and did they solve the problem? Often I see expressions like "So I studied Scala / Kotlin and I stopped liking java and don't need it at all." are they true?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Aleksey Pleshkov, 2016-08-02
@Bartar

These expressions are partly true. Java is a popular and powerful language, it will be in demand and needed for a long time. Scala has its own ecosystem and is poorly tied to Java (roughly speaking). Kotlin is not only fully compatible with java, but also a very thoughtful language in itself. I wrote several projects in Kotlin and after that it hurts to return to Java.
Conclusion: I advise you to look specifically in the direction of Kotlin, given not only the high-quality implementation of the language, but also full compatibility with Java (And there Java is automatically converted to Kotlin ;) ).

D
denisftw, 2016-09-14
@denisftw

In general, in terms of learning, Kotlin and Scala are very similar. Here we must pay tribute to the guys from JetBrains, who did not reinvent the wheel, but took the very successful syntax from Scala and diluted it a little with C#-like features.
Scala has two advantages - it's a much more developed ecosystem (plus, a full-fledged standard library, as @Sirikid correctly noted) and the presence of a "second bottom" in the form of a Typelevel hangout. Far from everyone reaches the last one, but if it’s interesting, type classes and category theory are used with might and main in purely functional Scala libraries, and it’s not that Java 8 won’t work - it’s not possible to do this in all FP languages.
Kotlin compiles faster and can therefore be easily integrated into existing Java workflows. Scala cannot afford this, since productive development almost always involves the use of SBT - ordinary Maven is indispensable here. Now many people use Kotlin for Android, but nevertheless, it is quite possible to write Web applications in Kotlin - I have a book about this - " Modern Web Development with Kotlin ".
That Scala allegedly has interoperability problems with Java is a popular myth. For example, my homemade blog generator s2genuses both pure Scala libraries like Monix and Circe and pure Java libraries like Apache Commons, Logback and FreeMarker without problems. There are indeed many wrappers written for Scala, but this is a consequence of the prevalence of the language, that's all. Five years from now, for Kotlin, the number of wrappers will be exactly the same, if not more - in fact, they already appear, for example, " jackson-module-kotlin " or " RxKotlin ".
Finally, about Java. Java is really not needed in most projects - both Kotlin and Scala give similar performance while increasing productivity at least one and a half times. Another thing is that there are still organizational barriers - to teach all developers new languages, to translate the build system, CI, etc. - but if finding a job isn't a priority, then it doesn't matter.

R
Rou1997, 2016-08-02
@Rou1997

The difference is only in the syntax, everything else is the same, both languages ​​solve the problem of the verbosity of the syntax, but not the problem of the libraries themselves.
Is it worth studying, the question is: for which OS are you going to write, what programs? For some operating systems and tasks, there are even better languages.

E
Evhen, 2016-08-02
@EugeneP2

Scala seems to be dying... There are no large projects on Kotlin yet, but for the sake of interest, I would choose Kotlin.

C
ComatoZZZ, 2016-08-02
@ComatoZZZ

Now BigData is developing and there is a lot of Scala. For example, the same spark.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question