Lisp-family languages (both CL and its immediate predecessors, and Scheme) for a long time were the textbook example of functional languages. The relatively novel (and still niche) attempt to redefine things so that only pure functional languages are “functional languages”, and particularly the people that insist on this usage as if it were firmly established and abuse those who don't conform to their preferred redefinition, is a bit annoying.
(union (lambda (x y) (cond ((null x) y) ((member
(car x) y) (union (cdr x) y)) (t (cons (car x)
(union (cdr x) y))))))
It had a MAPLIST (today called MAPCAR): maplist[x;fn]=[null[x]->NIL;
t->cons[fn[x];maplist[cdr[x];fn]]]
Or APPEND: append[x;y] = [null[x] -> y; T -> cons[car[x]; append[cdr[x];y]]]
Et cetera. Sure, it also had, say, NCONC. But it had these operators and style from the beginning, not surprisingly, as Lisp came from lambda calculus.Point being, its very hard to say "X is or is not functional", as there isn't an objective consideration.
(FYI, I love Haskell and use it daily and write it professionally)
There may be some other examples in there. Personally I like things with controlled side effects. But it’s just my preferred set of trade offs.
Anyway I mean its just tough to be dogmatic about it. I get what you’re saying but why is that the dividing line?
Language features which are only possibly used in a non-functional style make me want to say that describing the language as 'functional' is either wrong or saying a language is 'functional' is a meaningless claim. If every language is functional, saying it is completely redundant.
I like your idea of saying FP style is idiomatic in that language might qualify the language as being described as 'functional', which I think agrees with my intuition that mutable strings being built in is evidence that calling that language 'Functional' is misleading or silly.
Sure you can write functionally in Python with generators, first class and higher order functions, but its not really how the community writes (all the time).
Scheme isn't pure functional, it is mutable, but people write _as if_ it is immutable.
Nope. There are no cons cells here.