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
View all comments
Show parent comment
4
u/ScottBurson Apr 29 '25
It's not specified to do TCO, so technically, in code intended to be completely portable, you have to assume it doesn't. That said, some widely used implementations do TCO in at least some circumstances. CMUCL and its fork SBCL do TCO everywhere by default; SBCL is the most widely-used open-source implementation. Among commercial Common Lisps, Franz Allegro IIRC does TCO on local calls (calls within a top-level function to functions defined with 'labels' or 'flet' within that function), and I faintly recall that Lispworks does so too, or maybe does it everywhere.
So, it depends on what you're doing. If you're writing a library that you want people to be able to use on any CL, you have to do without it. But if you're writing an application where you control the platform it will be run on, in practice you probably can use it.
Not an ideal situation, I agree, but not quite as bad as it might sound.