General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lepi Doptera
Computerphile
comments
Comments by "Lepi Doptera" (@lepidoptera9337) on "Functional Programming u0026 Haskell - Computerphile" video.
And if function doesn't do anything additionally, then it's useless. So by your definition all programs that do something useful are bad design. ;-)
2
A pure function is useless.
2
If a program doesn't have a side effect, then it's useless.
2
And that way you have never written anything resembling complex software, either. Pure functions are basically just breaking a long piece of code into shorter pieces of code. They are doing absolutely nothing for you in terms of actual problem solving. Having said that, if you have used even one IO function in your life, then your statement that you have only written pure functions is not even true.
2
Functional programming is for those who didn't pay attention in CS 101 when computer architecture was discussed and who want their compilers to auto-magically solve all the problems that are the result of real computer architecture.
1
@Wabbajack-kj2kg The entire purpose of your computer is to produce side effects. Functional programming simply misidentifies the problem. The problem is not to avoid side effects and state. The problem is how to manage side effects and state safely. The latter requires an understanding of what causes state modifications to be unsafe (non-atomic operations, for instance) and most of those real problems can not be solved with a programming language paradigm. They are not a matter of grammar at all.
1