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

I personally find this one-liner mentally difficult to parse in a glance. Yes, I can fully understand what it's actually doing, but when I glance at the code I have to focus on it too long before I am sure of what it is doing.

For better or worse, I operate mainly in the PHP world and the recently added spaceship operator is a solution to this. While I think it's a crazy operator on the one hand, on the other it's much simpler to use. https://www.php.net/manual/en/migration70.new-features.php#m...

  return a <=> b;
EDIT: fixing typos

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