r/functionalprogramming • • Apr 29 '25

Question Is Lisp Functional?

Do you guys consider lisp languages (CL in particular) to be functional? Of course they can be used functionally, but they also have some OOP qualities. Do you CALL them functional or multi-paradigm?

39 Upvotes

61 comments sorted by

View all comments

Show parent comment

4

u/stylewarning Apr 30 '25

This Common Lisp code, a line-for-line port of Haskell code, has all the characteristics you mention:

  • First-class functions (including those by lambda abstractions and currying)
  • Application by juxtaposition (but you need parentheses since there is no operator precedence)
  • Recursive let
  • Immutable data structures (including RRB-tree-backed Seqs)
  • ADTs

It also has an algebraic type system a la Hindley Milner with type classes.

edit: Of course, not all Common Lisp code is confined to the above characteristics. Does that make it ineligible to be properly functional in your definition?

0

u/jonathancast Apr 30 '25

Yes, to be a functional programming language those things have to be features of the language.

Of course a good programmer can always choose not to call setcar, but my point is it's there in the language in Lisps, usually, and isn't there in functional languages.