-
Notifications
You must be signed in to change notification settings - Fork 46
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
Proposal: if <expr> then <expr> else <expr> #98
Comments
Agree. Even as a long time pythonist, python's way always feels backwards to me; it goes against every single language's ternary flow and doesn't read as well. |
TL;DR; I'm not sure. BUT!... It depends how you look at it. Let's get rid of "else ". Then let's compare this (oh dear gamedev): NOW let's assume that you read from left to right. First what you can see in second example is But to be authentic myself, I noticed that it's like fighting with stupid habits. And behaviour "I like it better because I've seen it first in my life" is a stupid habit. So let's go back to me being authentic - years ago I would agree with @BrianTMaurer and @fuzzthink. Now I'm not sure. To see it more alive. Some other example (taken from WebSocket implementation in ActionScript):
What's more important? Condition or returning value? And the last short comparison: which is better and why? You know my arguments. |
While I agree that it's a familiarity issue, the
|
My opinion on this is that familiarity with the JS should be preferred in all cases. In this case, JS has no similar feature any way. |
Please no, not lua. |
@zekesonxx Please elaborate a little. |
To improve "natural" left-to-right readability I would love to see
if <expr> then <expr> else <expr>;
expressions.The text was updated successfully, but these errors were encountered: