But that's not the point; a functional style can be achieved in any language as long as it has functions.
Additionally you should know that functional programming is a lie. Your computer is an imperative machine with no understanding of functional programming. The compiler transforms your functional program into an imperative one.
Yet you program a register machine as if it were a stack machine all the time without batting an eyelid!
This is your original argument. I said that FP programs offer none of the said guarantees because they are at it's core compiled into imperative programs... You responded with a statement about a stack machine being an abstraction over a "register machine." How does the stack machine statement move your original argument forward...? We're getting side tracked here...
Keep in mind that passing a first class function into another function as a parameter is not that far off from passing the result of that function as a parameter.
Without first class functions an immutable program can still be turing complete. I would say that if a language only supports recursion and is immuteable, then that is all you need for the language to be part of the fp paradigm.
I'm sorry to say that if you don't understand this, you haven't really understood what functional programming is... You're just a guy who understands higher order functions.
...
> I'm sorry to say that if you don't understand this, you haven't really understood what functional programming is...
you can't be serious can you ?
>The only technical requirement for you to follow the functional paradigm is immutability.
Then you don't understand functional programming. I can't take you seriously if you claim otherwise.
Obviously, you highly disagree with me. Feel free to elaborate rather than waste my time with obviously rhetorical questions.
So are you saying that for instance both CaML and LISP aren't FP ? Because both are certainly not about immutability and you can write mutable messes in either.
Read the first line:
"In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. It is a declarative programming paradigm, which means programming is done with expressions[1] or declarations[2] instead of statements."
Key phrase: "avoids changing-state and mutable data."
You can use C++ as if it was a functional language just like you can use LISP and CaML as if variables were mutable. However in both cases you are bending the language to follow a paradigm that is NOT functional.
Not that far off unless you want to do partial application, currying, lazy evaluation, analyze, or change the code of the function before actually using it.