A
A
artemkulyk2012-10-25 11:02:05
Java
artemkulyk, 2012-10-25 11:02:05

What are the advantages of Scala over Java8?

Hello!

Question for Java and Scala experts. I'm wondering if Scala has any tangible advantages over the announced Java8? I worked mainly with C/C++ for 8 years, now I want to learn a new programming language. The main goal is to warm up the brain and master functional programming, the secondary goal is to use the knowledge gained to develop the server side of the application (pet project). Scala was very interested, but the question arose - will Scala be relevant after the release of Java8? I don't want to invest in learning a technology that may lose its benefits in a few years.

Thank you for your responses.

Answer the question

In order to leave comments, you need to log in

10 answer(s)
K
Konstantin Kitmanov, 2012-10-25
@k12th

Scala is very suitable for warming up the brains, but whether it remains relevant - time will tell, and not Java releases at all.
Scala is a language with a strong FP component, Java will never have this, and lambdas will not help here.

C
charon, 2012-10-25
@charon

if you are interested in purely warming up the brain and learning a new paradigm (FP), then better master Haskell. True, in this case you will have to forget about your secondary goal.
Mastering pure Java will not bring you very close to understanding FP, but you can apply it in your work with great success.

I
ivnik, 2012-10-25
@ivnik

Java 8 will not be a functional PL, the changes are very conservative (probably this is something good). One of the innovations of J8 is the functional style of working with collections (and some other elements of the standard library) and a more convenient syntax for writing lamb functions.
If you want to learn a functional language, then scala is worth a try. If you want to learn an industrial programming language, then you better learn java. By the way, scala runs under the java virtual machine and scala code can use any java libraries (including the standard library).
If you decide to learn scala, I recommend the scala lectures on coursera by Martin Oderski, the author of scala: https://www.coursera.org/course/progfun

S
Seter17, 2012-10-25
@Seter17

For example, in Scala it is very convenient to build syntax trees and create parsers. But Java is probably more suitable for creating business applications, because it has been working in this direction for a long time

K
keltanas, 2012-10-25
@keltanas

Of all the above, Erlang seems to me to be the most consistent with the requirements for clarification. More and more on the Internet I meet positive reviews about it, not only as an esoteric language, but as a language that is successfully used in production.
Brief introduction to Erlang www.insight-it.ru/programmirovanie/erlang/osnovy-erlang-sintaksis-i-punktuaciya/

C
charon, 2012-10-25
@charon

I believe that you should learn Java - this is the basis of many languages, incl. Scala. With Java, it will be easier for you to switch not only to Scala, but also to many other languages. In addition, many Scala learning sources assume that you know Java.

K
kuzemchik, 2012-10-25
@kuzemchik

In some things, the scala compiler works more correctly, getting rid of the crutches of java bytecode.
Also, someday scala will compile to the CLR.
Java is good, but I prefer scala. It will be quite easy to move from scala to java (Java syntax is closer to c++)

K
ks_ks, 2012-10-26
@ks_ks

There are +\- 100 messages in the clojure google group daily. Judging by this, it can be noted that it is developing very actively ...
+ a bunch of emerging video tutorials. + emacs which is supposed to be development and its emacs lisp (which should be very similar to clojure) is an advantage in itself. :) There is also such a little bauble, which may in the future be more convenient than the same coffee-script, for working with JS. Well, this is a fully functional i\n.

S
strobegen, 2014-01-01
@strobegen

I would suggest that you add Ocaml or F# to the list for consideration (in fact, it is almost the same language)
- both of these languages ​​\u200b\u200bare similar to Scala, in that they combine FP and OOP, and in general they are very similar, there is even such a comparison along with haskell : Languages ​​with Type Inference: OCaml, F#, Scala, H...
- both are developing quite well lately.
But unlike the rock, these languages ​​are much more concise and simple, and unlike Haskell, you can apply the usual methods of work there if necessary.
I recommend reading this about the hardships of choice:
Replacing Python: Candidates
Replacing Python: Second Round
Clojure, Common Lisp, Scheme - I would suggest leaving it for later, since they do not have a powerful type system, except that you can casually get acquainted with the general principles of Lisp, as there are quite a few articles where the basic principles of FP are considered using the scheme example.
Judging by the irc channels, Clojure is wildly popular right now, more than a rock at about Haskell level.

M
Mikhail Potanin, 2015-02-20
@potan

Pattern matching, better work with collections, REPL, advanced type system, compact syntax, no need to write 'return' again.
Of the disadvantages - more complex code refactoring (patterns are not yet very well developed).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question