What's the difference between the tilde ~ and exclamation ! operators?

None, they’re identical:

But the distinction between ! for logical negation and ~ for bit twiddling is pretty common in many other languages.

10 Likes