Hacker News new | past | comments | ask | show | jobs | submit login

If you ask most programmer, ~ is definitely not a bitwise-NOT operation.



It's the bitwise-NOT operator in C, java, and python just off the top of my head, I think most people are familiar with it


In Go we use ^ for bitwise-NOT.


Surely that is xor? Ah I looked it up and it is xor, but unary ^ is NOT. Interesting overloading.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: