Open rpgoldman opened 3 years ago
I would use :elif
rather than :elsif
. The extra letter is no more clear (since it's still not complete like :elseif
or :else-if
), and Python's use of elif
has cemented the 4-letter version as standard.
Enhancing the method syntax would definitely be an improvement. But I would vote for :elseif, which is what Julia uses.
A proposal: if the work to implement a/the new syntax is not too much, how about implementing something so that people can play with it, with the understanding that it is subject to change?
(Based on discussion with @gefjon)
The current syntax for methods is quite hard to read, especially when there are multiple if-then-else branches.
Suggest we create an alternative syntax that's easy to read for the simple case and introduce
:if
:elsif
and:else
keywords for processing the more complex branching structure.