Replies: 1 comment
-
No, this sounds like a bad idea. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I suggest replacing "else" and "else if" with "or" in conditional statements.
The result will be more compact and beautiful code, making the "or" operator more versatile, reducing the number of reserved words, and simplifying the language itself, since you can use one operator instead of two.
Here's an example:
In the example, "or" replaces "else" and "else if" - if there are no conditional statements between "or" and "{", then it replaces "else" otherwise - "else if", so you get something universal like "for"
Beta Was this translation helpful? Give feedback.
All reactions