When would I prefer the `.not()` postfix over the ...
# codingconventions
m
When would I prefer the
.not()
postfix over the prefix
!
for a "is not" check, when not? I can't finda good guideline, and for me personally, the prefixed
!
reads easier, but that might just because I'm used to it. Also it's related to
!=
which I wouldn't want to repace with
(a == b).not()
...
e
I could imagine putting
not()
in a chain, although I haven’t done it.
I guess it would be pretty boring chain, if all it contained was a boolean.
🙂 1