Last active
August 29, 2015 14:25
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) |
adriaanm
commented
Jul 17, 2015
http://scalapuzzlers.com/#pzzlr-036
and
https://gitter.im/scala/scala?at=55a86b33ad99869443daa070
which constitutes a trend.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment