That's no true at all. The syntax is pretty similar with few key differences. The idea is for dotty to become Scala 3.0. But, in the meantime, the next Scala 2.* versions will pave the way for 3.0. Meaning to avoid too many breaking changes in 3.0.
The above has been said repeatedly by Martin Odersky (creator of Scala) and the folks on the Scala compiler team in talks and discussions.
You may try out using Scala as script language like this: "scala myScript.scala". The first startup times are slower, and even after that it may be slower than Python/Ruby but it still may be sufficient for your use case.
Using "sbt ~run" (re-runs your program automatically at every file change) may also be an option.
From my brazilian perspective it's very strange to read this. In Brazil, vacation is mandatory by law. Any employee has 30 days of vacation by year. But the moment the employee goes on vacation and how he does it (30 days straight, 15-15 days, 20-10...) is still discussed previously with the employer.
I'm not judging which one is better, just acknowledging the culture difference.
Not really a natural law, but medicine from time to time finds out that working too much or sleeping less or not having time for pleasure/fun/family hurts your health.
You can actually make it automatically convert in both directions with just an import. But it is good practice to do it explicitly.
In my opinion, for a typesafe language, this is a good way to do it.
You can actually make it automatically convert in both directions with just an import. But it is good practice to do it explicitly.
In my opinion, for a typesafe language, this is a good way to do it.
A few suggestions:
you could remove this kind of idiom: .map( result = { ... })
In the blocking commands example the snippet resembles the Javascript callback hell when it could be simpler to read: https://gist.github.com/felipehummel/6187248
Also, even simplifying it, it still seems overcomplicated. The returning type: Future[Try[Option[(String, ByteString)]]] is too much. Can't you remove the Try or the Option? Futures can already hold either a Sucess or Failure, so isn't the Try redundant?
Comparing Pattern matching to "ifs and elses" shows that, saddly, he didn't really understand its power.
Also, his opinion on Options seems to forget its advantage that the compiler won't let you use a "nullable" object without proper care. It is the main thing about it.
From the talk, it seems that he was new to Scala, didn't properly understand its concepts, wrote a bunch of spaguetti code and then blamed the language.
It hasn't been a real problem for me. But I cant say the same for every kind of program developed in Scala. I'm not saying that it is not a problem and I dont recognize it. Its just that, for me, the problem is much smaller than some people here seem to think.
Maybe I've waited too long too many times for gcc to compile C/C++ that when I went to Scala I thought waiting some seconds to compile is okay =P
Just use sbt ~compile. It will compile every time a file changes (only what is needed) . I've been using Scala full time for a year now, and I've never been bothered by compiling time.
One simple example of Scala power is the greatness of the Future pattern (scala, akka, finagle/twitter and other implementations).
You can still have the exact same Futures functionality in Java, but they will be so much more verbose and annoying to use that it ends up not being a good idea.
Scala compilation is indeed slow (although I think C++ is worse). But I always have a "sbt ~compile" running, compiling every file as they change. So the compilation time is pretty much irrelevant to me. While using eclipse, I guess, you'd get the same speed too.
The "much harder to read" varies greatly between codebases. Most "sane" codebases are 90% (random percentage) as easy to read as Java. Just collection initialization, transformations, simple pattern-matching, method invocations...
Some times there is an ugly nested flatMaps/maps/filters. But in my experience, in general, they're more the exception than the rule.