Re:Scala – The good, the bad and the very ugly
by lmm on Tuesday October 07, 2014 @08:44AM
(#8420774)
You still have to put code inside an object, but it's two lines of boilerplate rather than Java's 8 or so:
object MyApp extends App {
code here
}
I tend to use Maven to build my projects, so test classes have to go in src/main/test, have names ending in Test, and have their test methods annotated with @Test. But there's nothing to stop you making another App that just runs tests when it's executed, if you want to do that.
Things should be orthogonal, and that's usually something Scala is very good at, e.g. the way (scalaz) Futures are handled is IMO a very elegant balance between exposing the difference between sync and async code and not making it too cumbersome to use.
Things should be orthogonal, and that's usually something Scala is very good at, e.g. the way (scalaz) Futures are handled is IMO a very elegant balance between exposing the difference between sync and async code and not making it too cumbersome to use.