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

Abuse of bitwise operators is an abomination, but I'd instinctively write "value.abs" (scala), which is clearer than an if.

Obviously many things are ultimately implemented using if, but it's too low-level a construct to be using for day-to-day work.




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

Search: