Last active
August 29, 2015 14:25
-
-
Save paulp/6d69b71bd6f2ee272762 to your computer and use it in GitHub Desktop.
parens vs. braces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> case class Foo(x: Int = -12345) | |
defined class Foo | |
scala> def y = 5 | |
y: Int | |
scala> val x = Foo(y) | |
x: Foo = Foo(5) | |
scala> val x = Foo{y} | |
x: Foo = Foo(5) | |
scala> val x = new Foo(y) | |
x: Foo = Foo(5) | |
scala> val x = new Foo{y} | |
x: Foo = Foo(-12345) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://scalapuzzlers.com/#pzzlr-036
and
https://gitter.im/scala/scala?at=55a86b33ad99869443daa070
which constitutes a trend.