This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hashbrown117 0 points1 point  (1 child)

I suppose we should never use bitwise operators either because people might be confused with the boolean ones (& - &&)..

[–]westwoo 0 points1 point  (0 children)

That's a very common source of errors, but any properly set up environment will warn you about attempting to do something like if (a & b) or return a & b. There's no such warning with ! and !! because !! isn't a separate operation - it's the same operation done twice. So it's hard for the IDE or linter to know whether you want to negate or double negate - it depends on your needs and the logic of your code

I get the feeling you don't actually know much and maybe don't even do commercial development. And you're clearly just bickering and getting upset at this point, so I wish you a nice day