Hacker News new | ask | show | jobs
by flavio81 42 days ago
A requirement for functional programming is that there's no action from a distance, thus, functions should not modify variables outside of their scope.

This doesn't exactly mean immutable data structures are mandatory, but it helps.

In any case, most of the functions that operate on data structures in Lisp (or Common Lisp) do it in an immutable way.

1 comments

That is a projected, community-localized, requirement that ignores historic evolution of the practice. It is very interesting that machines can now be more flexible and understanding about nomenclature subtleties like this than some human engineers. Since we are adding layer after layer of pedantry -- rather than 'requirement' -- 'ethic' or 'practice' would be a more effective, practical and inclusive word choice here. The subtext of this thread, that Clojure somehow isn't a "functional enough" language to be labelled a "functional" language is narrow community prejudice.