If I write the expression,
if not (expr1 or expr2) then value
I get the following warning from FSharpLint, In F# code, use 'e1 || e2' instead of 'e1 or e2'
.
Why is using ||
preferred over using or
? I want to write idiomatic code, but this appears to me to degrade readability. I really like the readability of the not
function over !
. the above example expression reads nicer and is much more declarative than the C# counterpart,
if (!(expr1 || expr2)) { return value; }
So why regress the readability improvement by suggesting double pipes instead of or
?