Possible Duplicate: When to use the equals sign in a Scala method declaration?
What's the difference between
def x {}
and
def x = {}
?
def x {} is called "procedure" style, it is shorthand for def x: Unit = {} (quoting Viktor Klang from this post).
def x: Unit = {}