[Haskell-cafe] if-then without -else?
Stefan Monnier
monnier at iro.umontreal.ca
Mon Jul 9 20:03:26 UTC 2018
> Was this considered at some point in Haskell's design process?
I don't know, but such an `if .. then` without `else` would encourage
bad coding practices, IMO.
On a related note: in C and friends if can do
if () { .... };
but you can't do
int x = E1 ? E2;
So, even those pragmatic people (including those C++ people who like to
include not just the kitchen sink but the surrounding farm as
well) agree with Haskell's designers.
Stefan
More information about the Haskell-Cafe
mailing list