4 ms·
Functional Programming Is Worse Than Crap: State Changes Are Essential...
- colanderman 15y agoWhat most FP theorists fail to explain is that, in FP, the function itself is the variable. The variable value of functions are kept on the stack and are used as arguments for other functions. One function affects another. Insisting that there are no variables and thus no side effects in FP is wishful thinking at best and crackpottery at worst. The author is misunderstanding FP entirely; possibly due to FP zealots misunderstanding FP entirely. The key to FP is not some abstract hand-wavy idea of "stuff never changing", which is the strawman on which he built this entire post. It is referential transparency ( http://en.wikipedia.org/wiki/Referential_transparency_(computer_science) http://en.wikipedia.org/wiki/Referential_transparency_(compu... ). Referential transparency is the notion that any given expression can be replaced with its value without changing the result of the program. This property does wonders for formal verification since it allows programs to be broken into pieces for ease of verification (this is a huge win). FP, by making all state explicit, trivially exhibits referential transparency (since the dependencies of an expression are syntactically present within it). Imperative languages, by making state implicit, do not exhibit this property. A study languages which exhibit referential transparency yet have state, such as Mercury or Flapjax, shows that state is not incompatible with referential transparency or functional programming in the manner the author believes. A solid understanding of reduction-semantics such as that used by the lambda calculus would also help him form a more coherent argument (particularly the points about "functions being variable" don't make logical sense).
- empthought 15y agohttp://scienceblogs.com/pharyngula/2008/01/the_return_of_louis_savain.php http://scienceblogs.com/pharyngula/2008/01/the_return_of_lou... "I'd be surprised if any of you knew who Louis Savain is — he's a weird little crackpot that I stomped on hard all of 3½ years ago..."
- colanderman 15y agobwahaha thanks for finding this. Reminds me a bit of the Time Cube guy (http://timecube.org/ http://timecube.org/).
- tincholio 15y agoThis article is worse than crap, the author doesn't have a clue.