groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (GROOVY-4874) Elvis assignment operator
Date Thu, 02 Feb 2017 05:09:52 GMT

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

Daniel Sun reassigned GROOVY-4874:
----------------------------------

    Assignee: Daniel Sun

> 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)

Mime
View raw message