Thread overview
[OT] Interesting blog post on disadvantages of the pure functional paradigm
Dec 08, 2016
Stefan Koch
Dec 09, 2016
Kagamin
Dec 09, 2016
qznc
Dec 09, 2016
Kagamin
Dec 09, 2016
Kagamin
Dec 09, 2016
qznc
Dec 10, 2016
Timon Gehr
December 08, 2016
http://flyingfrogblog.blogspot.com/2016/05/disadvantages-of-purely-functional.html -- Andrei
December 08, 2016
On Thursday, 8 December 2016 at 13:40:21 UTC, Andrei Alexandrescu wrote:
> http://flyingfrogblog.blogspot.com/2016/05/disadvantages-of-purely-functional.html -- Andrei

Great Find! Thanks for sharing it.

This article expresses in nice words what is wrong with mono-paradigm languages.
Performance always has to yield to the Paradigm.
December 09, 2016
Functional doesn't imply purity and immutability, and mutable functional has cognitive problems: mutation is important, but functional code is too high level, so whatever happens is hidden from the programmer; D suffers from this too as people are confused whether ranges are taken by value or by reference - this is important because they are mutable.
December 09, 2016
On Friday, 9 December 2016 at 09:58:27 UTC, Kagamin wrote:
> Functional doesn't imply purity and immutability

I disagree.

What is your definition of Functional Programming? Mine: http://beza1e1.tuxen.de/articles/functional.html

December 09, 2016
On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote:
> What is your definition of Functional Programming? Mine: http://beza1e1.tuxen.de/articles/functional.html

I think, it's more about being declarative.
December 09, 2016
On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote:
> http://beza1e1.tuxen.de/articles/functional.html

What about python and javascript?
December 09, 2016
On Friday, 9 December 2016 at 10:25:49 UTC, Kagamin wrote:
> On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote:
>> http://beza1e1.tuxen.de/articles/functional.html
>
> What about python and javascript?

Python and Javascript are mixed paradigm languages. You could argue if purity and immutability are part of FP, then Python and Javascript lack essential parts of FP and are not mixed. That is a good point. It is also what hardcore FP programmers think about those languages. They pity them.

If FP is about being declarative, then logic programming (Prolog) is even more so.
December 10, 2016
On 10.12.2016 00:25, qznc wrote:
> On Friday, 9 December 2016 at 10:25:49 UTC, Kagamin wrote:
>> On Friday, 9 December 2016 at 10:01:13 UTC, qznc wrote:
>>> http://beza1e1.tuxen.de/articles/functional.html
>>
>> What about python and javascript?
>
> Python and Javascript are mixed paradigm languages. You could argue if
> purity and immutability are part of FP, then Python and Javascript lack
> essential parts of FP and are not mixed. That is a good point. It is
> also what hardcore FP programmers think about those languages. They pity
> them.
> ...

I don't think it is necessarily the best approach to start with an imperative language and then say that purity and immutability are somehow features you add on top in order to obtain FP. [1]

It is just as valid to consider impure languages as restrictions of pure functional programming languages where all computations take place in a specific non-customizable monad.

If the starting point is logic, functional is more fundamental, if the starting point is current hardware, imperative is more fundamental. I think it is useful to understand both of those perspectives well.


> If FP is about being declarative, then logic programming (Prolog) is
> even more so.

Questionable.

Quick google search finds this post, there might be better explanations: https://synthese.wordpress.com/2010/08/21/prologs-death/




[1] Also, immutability, in the D sense, is not essential. What is important is value semantics. Immutability actually prevents lazy functional programming.