[ https://issues.apache.org/jira/browse/GROOVY-5183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15837636#comment-15837636 ]
Daniel Sun commented on GROOVY-5183: ------------------------------------ Jochen, could you offer us some example to show the solution? > It would be Groovy if postfix conditionals were available like in Perl > ---------------------------------------------------------------------- > > Key: GROOVY-5183 > URL: https://issues.apache.org/jira/browse/GROOVY-5183 > Project: Groovy > Issue Type: Improvement > Components: syntax > Affects Versions: 2.0-beta-1 > Environment: any > Reporter: ericksn > Priority: Minor > Fix For: 4.0 > > > I would be nice if Groovy supported Perl's postfix conditionals. > This is something I really miss from Perl. > In Perl you can supply a boolean condition to the loop control next, last or > redo statements. > In Groovy it would be cool if we could do the same with continue or break. > small example > {code:Java} > while (some condition) { > if (condition) continue > if (another_condition) break > } > {code} > example using postfix loop control > {code:Java} > while (some condition) { > continue if condition > break if another_condition > } > {code} > or > {code:Java} > LABEL: > while (some condition) { > continue LABEL if condition > break LABEL if another_condition > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)