groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel.Sun" <sun...@apache.org>
Subject Re: Groovy 3.0: Multiline list/map arguments
Date Fri, 06 Apr 2018 17:49:43 GMT
Hi mg,

      It's dangerous to let blank characters determine the grammar, which is
the lesson learned from Ruby ;-)

```ruby
def f(p)
  return p * 2
end

f(3+2)+1     #  11 
f (3+2)+1    #  12,  have you seen the space between `f` and `(`  ?
```
(you can try the above code at http://tryruby.org)

Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Mime
View raw message