3 ms·
I wonder whether anyone has used "otherwise" for this. It'd be a simple alias for "else", but it'd certainly sound natural: if (X) { doY(); } otherwise
by throwawaw 6y ago
I wonder whether anyone has used "otherwise" for this. It'd be a simple alias for "else", but it'd certainly sound natural:
if (X) { doY(); }
otherwise { doZ(); }
- erk__ 6y agoTowards the bottom of the article there is a example of MAD[0] that uses something similar, and there is also the John McCarthy proposal which also uses otherwise. I could imagine it being used in a language that had a tight connection to maths as otherwise is often used there. [0]: https://en.wikipedia.org/wiki/MAD_(programming_language) https://en.wikipedia.org/wiki/MAD_(programming_language)
- throwawaw 6y agoOh, right, the article...