You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2017/02/02 05:09:52 UTC
[jira] [Assigned] (GROOVY-4874) Elvis assignment operator
[ 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)