3 ms·
> Polymorphism also gives you what amounts to functional programming without touching C's awful function pointer syntax. Which aspects of functional programmin
by eru 16y ago
> Polymorphism also gives you what amounts to functional programming without touching C's awful function pointer syntax.
Which aspects of functional programming are you talking about?
- ajuc 16y agoProbably operator() and passing classes that have this operator implemented around. For me it isn't better than function pointers, also because of method - function distinction we have 2 different incompatibile kinds of functions.
- eru 16y agoThe operator() does not bring you any closer to functional programming. It's just syntactic sugar, maybe even nice sugar.
- Daniel_Newby 16y ago> Which aspects of functional programming are you talking about? Passing around things that do work on other things -- easy with C++ worker objects, painful with C function pointers (or worse, pointers to structs full of function pointers).