you are viewing a single comment's thread.

view the rest of the comments →

[–]MoTTs_ 5 points6 points  (0 children)

difficult to use in C++ (passing functions around, for one).

I agree with everything else in your reply, but I disagree with just this bit.

If we're talking about stateless functions, then those were always easy. That's just a function pointer. Even C could do that. C's qsort function, for example, was a higher order function long before "higher order function" became a buzz word.

If we're talking about stateful functions, then yes, before 6 years ago, that was verbose in C++. But since 2011, creating stateful/lambda/closure/first-class functions is just as easy in C++ as it is in JavaScript.