Skip to main content
Post Made Community Wiki
Source Link
Tom Morris
  • 231
  • 1
  • 7

Scala multi-line code in brackets

For instance:

class Foo( val bar: String, val baz: Int, val bing: String, val bong: Boolean ) extends Model { // body here } 

What you actually get from it is terrific. It generates the constructor and the getters and setters for you. But it sure is ugly and breaks all my mental models of how to indent code and basically leaves me feeling like I'm in a sort of bizarre sandwich with Java on one side and Lisp on the other. (Oh, wait... that is rather the point of Scala.)