3 ms·
I have used it for writing a compiler for a research project. It is a great language so far. Even if you stick to a subset of Scala fairly close to Java, even t
by codedivine 17y ago
I have used it for writing a compiler for a research project. It is a great language so far. Even if you stick to a subset of Scala fairly close to Java, even then its a pretty big win. There are lots of little goodies. For example, type inference is really nice. For-comprehensions are pretty sweet. Lists are pretty awesome. Optional parenthesis for method calls is nice. And so on and so forth. These little things make Java a lot less annoying.
Of course, the little goodies are the tip on the iceberg. There is a lot more to Scala, primarily its support for FP but the learning curve is also much harder for those features. Power at the cost of learning.
On the downside, sometimes Scala code is TOO compact. For example, stuff like operators for list operations can be fairly hard to read without practice.
Interfacing with existing Java libraries is also easy. I have not tried calling Scala from Java however.
Overall I recommend the language. Its mature enough to be used for real projects and its a lot nicer and whole lot more powerful than Java.
- technomancy 17y ago> Its mature enough to be used for real projects and its a lot nicer and whole lot more powerful than Java. Sure, but that's not exactly saying a lot.
- davidw 17y agoActually what says a lot is that integration with Java is pretty easy, and it's more powerful than Java. That means it's easy for the hordes of Java users to jump ship, without, say, facing a rewrite to Ocaml or Erlang or Visual Haskell ++. That's pretty important.