Skip to main content
7 events
when toggle format what by license comment
Jun 27, 2022 at 17:24 vote accept Hartmut Braun
Jun 27, 2022 at 17:24 vote accept Hartmut Braun
Jun 27, 2022 at 17:24
Jun 27, 2022 at 11:24 comment added MSalters @Christophe:In C++, the abstract class mentioned in the question would would be std::invocable. std::function is a different beast. It's not abstract at all (although it's a template). It performs type erasure; it is a functor itself that can hold many different types of functors and function pointers as long as they can be invoked with roughly the same arguments.
Jun 27, 2022 at 0:39 comment added Silvio Mayolo Just to emphasize, please don't name something new "functor". It already means six different things, and we don't need someone else fighting for control over that word. If you're not using it in the category theory sense, you're just complicating the word. "Function" and "Callable" are great, and so are more specific things like "Supplier" or "Predicate" (going the Java way) if you know how your function is going to be used.
Jun 26, 2022 at 20:38 comment added Hartmut Braun Impressive list, indeed. My problem was that I couldn’t construct a search string because using the word „function“ didn’t get me anywhere. My second problem is now that, admittedly, I don’t immediately unterstand the documentation provided in the links you listed. On the first read it does not match the concept I have in mind. But I will take a closer look.
Jun 26, 2022 at 12:09 comment added Christophe Impressive list. You may add callable. Worth to mention that even if in the C++ circles we call it a functor, the standard library, still names it a std::function ;-)
Jun 26, 2022 at 11:39 history answered Jörg W Mittag CC BY-SA 4.0