2 ms·
> for example, no anonymous functions means that if you want to pass a simple one-time-use function to sort, you have to create a whole new file with your sort
by wolfgke 17y ago
> for example, no anonymous functions means that if you want to pass a simple one-time-use function to sort, you have to create a whole new file with your sort functor.
No you don't have to. Simply create an anonymous class deriving from your sort functor interface. With anonymous functions it would still be shorter, I have to admit. But it is less cumbersome than the way you suggest.