3 ms·
And JavaScript has enough functional support to be able to express the concepts. Some of the more type-y stuff is a bit harder to describe, though. But I thin
by eru 9y ago
And JavaScript has enough functional support to be able to express the concepts.
Some of the more type-y stuff is a bit harder to describe, though. But I think it's a worthwhile tradeoff for ease of accessibility.
(Now using C++ would have been truly boneheaded---since they don't have first-class functions in that language.)
- AzzieElbab 9y ago"Now using C++ would have been truly boneheaded ..." https://bartoszmilewski.com/2015/01/20/functors/ https://bartoszmilewski.com/2015/01/20/functors/
- eru 9y agoYes, you can do it in C++. But it's not a good medium for teaching those concepts. (The excellent article you linked to explains them in Haskell first, and then shows how to do them in C++ only afterwards.)