|
> Somehow haskell and friends shifted the discussion around functional programming to pure vs non-pure In direct response every other language in the mid 2010s saying, "Look, we're functional too, we can pass functions to other functions, see?" foo.bar()
.map(x => fireTheMissiles())
.collect();
C's had that forever: void qsort(void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *))
|
A function pointer is already half way there. What it lacks is lexical environment capture.
And things that are possible to do with closures never stop amazing me.
Anyways, functional programming is not about purity. It is something that came from the academia, with 2 major language families: ML-likes and Lisp-likes, each focusing on certain key features.
And purity is not even the key feature of MLs in general.