Get started with a simple real world structure for a simple Scala project Manual setup Install sbt from here Create a new folder for your project, e.g.: mkdir myProject and cd myProject Create the project folder structure: mkdir -p src/main/scala (Mac/Linux) mkdir src\main\scala (Windows) Create a file in src/main/scala e.g. echo 'object Hi { def main(args: Array[String]) = println("Hi!") }' >…
* a response to Why Ruby Rocks In case you are new to Scala, don’t take it as a representing case, this is not idiomatic scala, and there are much better featrues making Scala a great language in my opinion. Having said that, here are the 2 examples in the “Why Ruby Rocks” post, implemented in Scala: Automatic getters / setters Just like in Ruby, the boilerplate of writing getters / setters for…
I’ve been trying to understand the [cake pattern] (http://www.cakesolutions.net/teamblogs/2011/12/19/cake-pattern-in-depth/) in Scala for some time, and until I didn’t sit and write some code, it didn’t click. Here is my attempt to explain it (to myself mostly) hope it might help others get a better understanding of this interesting pattern. What is it for? Dependency injection, “the scala way”…