Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby-style trailing conditionals? #7193

Closed
RichMorin opened this issue Jun 9, 2014 · 3 comments
Closed

Ruby-style trailing conditionals? #7193

RichMorin opened this issue Jun 9, 2014 · 3 comments

Comments

@RichMorin
Copy link
Contributor

I'd like to have Ruby-style trailing conditionals, eg:

print(foo) if bar

None of the workarounds I know are very pretty...

@pao
Copy link
Member

pao commented Jun 9, 2014

For reference, the current prevailing style is to use bar && print(foo).

@stevengj
Copy link
Member

I prefer having the predicate come before the consequence. See also #6823 for an alternative proposal.

@JeffBezanson
Copy link
Sponsor Member

I also prefer the syntax in #6823.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants