4 ms·
Thank god it’s not “otherwise” or “alternatively”.
by wruza 5y ago
Thank god it’s not “otherwise” or “alternatively”.
- undreren 5y agoHaskell has “otherwise” as a built in constant that equals true. It reads better in some cases. f n | odd n = 3 * n + 1 | otherwise = n \\ 2
- amelius 5y agoWe'd have an "otherwise" key on our keyboards.
- Nevermark 5y agoMATLAB has 'otherwise' in switch statements: switch switch_expression case case_expression statements case case_expression statements ... otherwise statements end https://www.mathworks.com/help/matlab/ref/switch.html https://www.mathworks.com/help/matlab/ref/switch.html
- brigandish 5y agoI really like "otherwise", it might be easier for non-programmers to understand for one.