Permalink
Browse files

add clarification to eta-expansion point

  • Loading branch information...
lihaoyi committed May 27, 2017
1 parent 02954fd commit ae384dd3a8774bef45e7a94f46aec491aba7a24c
Showing with 17 additions and 0 deletions.
  1. +17 −0 post/20 - Warts of the Scala Programming Language.md
@@ -520,6 +520,23 @@ sets of parentheses as they are defined with (excluding implicits), and any
method call missing parens should be eta-expanded into the appropriate
function value.
Notably, removing the "optional parens" thing would not stop you from defining
"property" functions that are called without parens; it would just mean you
need to define such functions without parens, as is already possible:
```scala
@ def baz = 3
defined function baz
@ baz
res11: Int = 3
@ baz()
cmd12.sc:1: Int does not take parameters
val res12 = baz()
^
Compilation Failed
```
### Needing curlies/case for destructuring anonymous functions

0 comments on commit ae384dd

Please sign in to comment.