Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, I stated that. Those functions are impure. Purity is a lovely goal, but purity also isn't a defining characteristic of functional programming, it's a modern pursuit. I've met enough classic LISP practitioners that lived their whole programming lives in the most impure of functional programming, that I would never want to tell them to their face that what they did didn't count as functional programming because of all the leaky impurity in LISP (due to pragmatic considerations of the time).


> purity also isn't a defining characteristic of functional programming

Disagree. It is in fact the defining characteristic of functional programming.


It may be defining of pure functional programming. But not for "functional programming". Some arguments for why (and indeed some discussion for why not, too !) : https://wiki.c2.com/?FunctionalProgramming

Ed: and I suppose if a function call allocates a stack frame it's no longer a pure function? Or are all functions of type crash-or-value?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: