Hacker News new | ask | show | jobs
by incepted 3769 days ago
You're both right and wrong, it's just that "functional" has a lot of different definitions and nobody can agree on which one is correct.

As a result, "functional" has become pretty much meaningless when describing a programming language.

1 comments

Functional programming has always been the name of a programming paradigm that treats computation as the evaluation of mathematical functions.
That's one of the many definitions we have for it, yes.

Plenty of people will disagree with it too.

Please correct me if I am off the right track here, but is not the distinction the fact that: in a "functional language" or maybe "parenthentical up-cup evaluating language"

functions are invoked in an encapsulating way, and no state is kept between function-cup-up-segments-of-code, but there is a R.E.P.L that (replies) when you invoke a (parens) which is, in LISP-land known as a program.

However, now that I have mind-dumped that ^ I recall haskell and erlang also being called "functional" but I don't know their syntax any more than a chimpanzee knows that the sun is round.

Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions. A function is a rule that assigns, to every element of its domain, a unique element of its codomain.

Note that the above definition says nothing about how functions are to be evaluated: strictly, lazily, memoizing previously computed results, or using magic. No general-purpose programming paradigm can make such decisions for the programmer.