(Request) Else-if chains
Closed this issue · 0 comments
developedby commented
Long chains of if-else-if-else-if-else are annoying to right now as they will continuously increase
indentation.
I propose a python-like if-elif-else
if a:
...
elif b:
...
else:
...
Other options for keywords are elsif
and else if
An alternative syntax would be like a switch
if:
case a:
...
case b:
...
else:
...
Or using when
like in bend.
I like the first one because it is already what people expect from a python-looking language.