Answer the question
In order to leave comments, you need to log in
Why learn jvm languages other than Java?
What is the specific purpose of all languages: Kotlin, Scala, Groovy, Clojure and others, if you can write everything in Java?
What specifically makes people create/use others? In addition to the fact that the syntax or programming style itself is different, and sometimes it seems that it is not completely different, but simply specially modified to make it seem so (like “first the name, and then the type”, “instead of one strip, two in the lambda” ).
How to understand that project A is written in Java, but project B is already written in Scala or Groovy.
It seems clear about Kotlin, they stupidly reduced the size of Java constructs to make it easier to rivet Android applications.
Well, the main question is:
Why do Scala programmers say that this is the coolest PL, and after it they don’t want to return to Java. Then if he is so cool, why have I not heard almost about him for 6 years in IT (not commercial, but all the same, and all the more so because it is such a Kaif language? And where then are a bunch of vacancies for him?
Answer the question
In order to leave comments, you need to log in
This is a very strange question. Why are there so many languages for .NET when you can write everything in C#? Why are there so many languages when you can write everything in C? Why are there so many varieties of mobile phones? Why do cars come in different brands? Etc. etc. Because there is no single correct solution always and for the whole.
You need to be a highly experienced architect with knowledge of many languages and the ability to foresee the development of the project, and taking into account factors not directly related to development. This will allow you to choose the language that gives the maximum effect in your case.
Did you live in a cave?
There is no direct connection between the "coolness" of a language and the number of vacancies in it. There are a lot more janitors than neurosurgeons, but you wouldn't argue that being a janitor is cooler, will you?
And what prevents you from trying to write one medium-sized application in each of the languages? What is the use of our answers to you? You won't feel the difference that way. Here rockers will come and say again that their language is the best - you have already heard it)
Kotlin is better java, at least for the moment. MB java version 30 or 35 will reach the standard. Let's wait. Who does not want to wait - writes on Kotlin. After Kotlin, many people already have questions, why write in java?) One Null Safety is worth a lot, IMHO, of course. And for the hundredth time, kotlin was not created for android, it has no connection to android, it is a general purpose language. And then there is kotlin.js and kotlin native.
Scala - can be written like better java, but is best revealed with a functional approach. Fully functional. With all its + and -. It seems that the cats library is now on horseback and tagless final (that's all I've heard about modern scala :D). And now this is completely, not at all like in java. I'm not an adept, try it yourself, it might work.
Groovy is a dynamic language. It is good for prototyping and writing scripts (remember gradle). Fast, type inference, sugar. At one time, I really liked the test frameworks on groovy - Spock Framework and Geb - it was more pleasant to write tests with them than on junit.
Clojure is also functional like Scala, but even more hardcore. This is for those who once fell in love with lisp and are dragged from it. I only know that Nikita Prokopov writes on it. It seems that in an interview with frontend-weekend, he said why he writes in Clojure, or maybe somewhere else. Quite a rare language indeed.
Here is a coffee drink. Serve coffee with cream to one, milk to another, sugar to the third, and double strength and decaffeinated to the fourth.
Here is the same situation. If you are more accustomed to java write on it. there are still a lot of vacancies, I want a new one, well, who forbids you?
time goes by, the world is changing, and in the place with it the need for products, for example, now the number of frameworks / tools required for the average developer has greatly increased, hardware has also changed a lot since the time when Java was developed, multi-core systems have become widespread, products have become commonplace which work on clusters and so on. Scala - designed to simplify the growing complexity.
at the same time, Scala is not better than java, it is not about OOP or FP, it is a language that primarily practices a practical / pragmatic approach, striving to simplify work with frameworks, multi-core systems, clusters, various platforms (compile to js, compile natively and work without jvm, work with video cards, etc.).
And like any pragmatic language, it allows you to work with it in the way that someone is already used to working, for example, working like with Java.
one example of simplification: types in the rock are automatically inferred, they do not have to be specified, which makes it easy to experiment with the code and refactor it, all dependencies on types will be automatically inferred themselves.
For example, knowing the interfaces of Scala collections, you automatically know the interfaces of the overwhelming majority of frameworks existing in the ecosystem (common interfaces).
You can also port code designed as single-threaded to a multi-threaded environment, and then to a cluster, and so on.
There are simple schemes for creating your own elegant domain-specific languages (using operator overloading, implicit parameters, implicit functions, automatic type conversion).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question