I would expect .not() and ! to have the same exper...
# compiler
e
I would expect .not() and ! to have the same experience, but it looks like they are not. We got an internal discussion that there is not type casting with
not
and it doesn’t lead to
short circuit in a boolean evaluation
. The last one is probably expected since it has only sense for boolean type and you can have not operator for other types.
k
How can you short circuit 'not'?
e
Yeah, there was
not
involved in the boolean expression with
or
operator
k
?
e
Ah my bad
The first condition is false
so it works as expected 🙂
k
yep, when it's true, the second part doesn't run 🙂