You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few suggestions regardinbg the conditional statements (If, If-Else) The reason is that conditionals are quite uniform, there's not much lyrics in them, and sometimes they look totally unpoetic.
Add some aliases for If: When and Whether
That's not a big deal, but they may look much more fancy.
Add alias Or to the Else keyword. This will not be messed up with boolean or operaror, because it is in a different position lexically.
Add Else if statement (Aliases may be combinations of [Else, Otherwise, Or] [If, When, Whether ])
I think this statement is missing from the powerhouse. Yes, we can write nested Ifs, but we all know it's not that sexy.
Add single-statement blocks to the Else statement.
I know this is the hardest one of the four suggestions, but this way we could avoid single-word lines. Many cases one branch of a conditional statement is only a single statement - assignment, return statement or function call.
I could write examples for all of them, but someone with better imagination could write much better ones - I'm not a poet, especially not in English :D
The text was updated successfully, but these errors were encountered:
I have a few suggestions regardinbg the conditional statements (
If
,If-Else
) The reason is that conditionals are quite uniform, there's not much lyrics in them, and sometimes they look totally unpoetic.Add some aliases for
If
:When
andWhether
That's not a big deal, but they may look much more fancy.
Add alias
Or
to theElse
keyword. This will not be messed up with booleanor
operaror, because it is in a different position lexically.Add
Else if
statement (Aliases may be combinations of [Else
,Otherwise
,Or
] [If
,When
,Whether
])I think this statement is missing from the powerhouse. Yes, we can write nested
If
s, but we all know it's not that sexy.Add single-statement blocks to the
Else
statement.I know this is the hardest one of the four suggestions, but this way we could avoid single-word lines. Many cases one branch of a conditional statement is only a single statement - assignment, return statement or function call.
I could write examples for all of them, but someone with better imagination could write much better ones - I'm not a poet, especially not in English :D
The text was updated successfully, but these errors were encountered: