You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/05/02 02:33:04 UTC

[jira] [Updated] (GROOVY-4874) Elvis assignment operator

     [ https://issues.apache.org/jira/browse/GROOVY-4874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King updated GROOVY-4874:
------------------------------
    Fix Version/s:     (was: 3.0.0-alpha-1)

> Elvis assignment operator
> -------------------------
>
>                 Key: GROOVY-4874
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4874
>             Project: Groovy
>          Issue Type: Improvement
>          Components: syntax
>            Reporter: Uri Moszkowicz
>            Assignee: Daniel Sun
>            Priority: Minor
>
> It would be nice to have an operator similar to the Elvis operator but for assignments.
> {code}
> a ?= b
> {code}
> as a shorthand for
> {code}
> a = b ?: a
> {code}
> I'm not a Ruby expert but from the Groovy mailing list it sounds like Ruby has an operator like this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)