News for hackers. Stuff that matters.
Re:Clear is better than clever [pdf] by vivekseth on Monday May 06, 2019 @02:04PM (#19842051)
Why not something as simple as `return (a - b)` ?

It’s concise and simple to understand. Instead of returning 1 or -1 it returns a positive or negative value with I think is equally effective.

Re:Clear is better than clever [pdf] by commandlinefan on Monday May 06, 2019 @06:05PM (#19844408)
> return (a - b)

That will overflow if a & b are longs.