Why is that? Also, if you are concerned it could be misunderstood, put the lambda in a separate named function called reverse_order or something.
reverse_order
Now this is on the preference realm. After living many, many years in the low latency world, where things are not super readable, I like explicit things when possible, such as the block:
Ordering::Less => Ordering::Greater, Ordering::Greater => Ordering::Less,
And, of course, that's my personal preference :) Both are ok - and I agree with you that the function name is better using a descriptive name.
And thanks for the feedback!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why is that? Also, if you are concerned it could be misunderstood, put the lambda in a separate named function called
reverse_orderor something.Now this is on the preference realm. After living many, many years in the low latency world, where things are not super readable, I like explicit things when possible, such as the block:
And, of course, that's my personal preference :) Both are ok - and I agree with you that the function name is better using a descriptive name.
And thanks for the feedback!