[ 
https://issues.apache.org/jira/browse/GROOVY-7704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15050912#comment-15050912
 ] 

Dmitry Geurkov edited comment on GROOVY-7704 at 12/10/15 12:32 PM:
-------------------------------------------------------------------

yes, you are right, sorry if I didn't made it clear


was (Author: troydm):
yes, you are right, sorry if you I didn't made it clear

> .getAt epxression parsing rules
> -------------------------------
>
>                 Key: GROOVY-7704
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7704
>             Project: Groovy
>          Issue Type: Wish
>            Reporter: Dmitry Geurkov
>
> expression f[g] is translated into f.getAt(g)
> same is when there is a space between f and [g]
> however from my point of view space character introduces separation of 
> concept thus this behavior is not correct and it should be evaluated into 
> function call f([g]) instead of f.getAt(g)
> For example in Ruby f [g] is considered a function call with Array as first 
> argument which is more natural way looking at it. While in f[g] is correctly 
> interpreted as index lookup
> Some more examples of how this should behave:
> (1..10)[2] is correctly interpreted as index lookup
> (1..10) [2] is two separate objects: range and array



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to