4 ms·
> I'm not actually a fan of functors; I think they obscure the flow of the code, in the same way as using inheritance in OO While functors aren't something to
by strlen 13y ago
> I'm not actually a fan of functors; I think they obscure the flow of the code, in the same way as using inheritance in OO
While functors aren't something to us every day, aren't they more of an equivalent to the Decorator pattern in OO (which is more about composition and inheritance of interfaces as opposed to inheritance of concrete implementations which I agree is something to avoid)?
That said, I think I see what you mean -- I've found myself using functors needlessly because I've previously used adapters in their place in Java; instead, it may have been for it for me to ask myself what the real problem I'm trying to solve is.