|
|
|
|
|
by bmitc
804 days ago
|
|
It isn't clear what you're discussing. You mentioned that functional programming has lost its meaning and then went on to describe things as if your defintion would exclude some of the most shining examples of functional programming. Functional does not mean just pure functional. And a purely pure functional language would literally be worthless as it wouldn't be able to do anything useful. |
|
Maybe those examples are "most shining" from your perspective or definition but not mine. Mind to mention the specific languages?
That being said, to be precise, functional programming is a technique or style, it's not a property of a language anyhow. However, some languages make it very hard or even impossible to apply the style, either fully or partially. So practically speaking, that is how I classify a language as more or less functional.
> Functional does not mean just pure functional.
Yes, that's exactly what I said in my first sentence no?
Originally "functional programming" had the meaning of what we nowadays often call "pure functional programming" though. Language and definitions change over time. I was ranting a bit that the term "functional" is nowadays so unclear that there is little benefit in knowing that a language is "functional".
> And a purely pure functional language would literally be worthless as it wouldn't be able to do anything useful.
This is wrong. You haven't understand what functional programming is. In a nutshell it means that you are not directly executing effects, but rather that you build up a datastructure that describes the effect-execution. You then pass around an modify that datastructure to the point where you return it as the last thing that your does in the main-method (or whatever your language/runtime calls that). From that point on, this datastructure is being processed and the effects (like writing to a file, showing something on the screen) are (most likely) executed by the runtime.
In other words, there is no restrictions on what you can do with a pure functional language. You can try it out with Idris, which is a 100% pure functional language without any escape hatches. And still you can make it do all kinds of effectful things like processing files, sending emails, ...