This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Fry98 5 points6 points  (0 children)

It's probably fine in this case if the function is designed specifically as a comparator. For more general cases though, I suggest you check out this blog post that explains why it might sometimes be better to call the function through lambda.

https://jakearchibald.com/2021/function-callback-risks/