4 ms·
Uses in Haskell and ML seem to follow its math origin, but why in C++ they have come to call it functor?
by kazuya 16y ago
Uses in Haskell and ML seem to follow its math origin, but why in C++ they have come to call it functor?
- sid0 16y agoBecause functor is kinda-sorta a portmanteau of function object and people wanted to sound clever, I guess.
- wozer 16y agoIf you think of a C++ functor as a class, i.e. a factory for function objects, it makes a little bit more sense. (However, that is not the common usage of the word in C++ world. For most C++ guys, "functor" and "function object" mean the exact same thing.)