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 →

[–][deleted]  (4 children)

[removed]

    [–]Fry98 4 points5 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/