3 ms·
Common Lisp isn't a language particularly focused on FP, in fact, since pretty much everything is mutable, eager and dynamic, you might consider it downright aw
by pavelludiq 10y ago
Common Lisp isn't a language particularly focused on FP, in fact, since pretty much everything is mutable, eager and dynamic, you might consider it downright awful at that. CL has more in common with Smalltalk than with Haskell or ML IMO. It's strength comes from a different way of looking at things: macros, a powerful live environment that's unmatched by pretty much anything, an absurdly stable spec you can rely on, one of the best approaches to OO I've encountered and an scary attention to details in certain parts of the language.
Because it's so flexible and multi-paradigm, you can pretend it's an FP language and maybe get away with it, but you'll have to bring your own bondage and discipline rather than rely on the compiler, or write a language on top of it that does that(check out shen if you haven't).
- proaralyst 10y agoSo what paradigm would you suggest? A combination of imperative with functional where it's better suited? Or is Lisp best programmed with an entirely new approach?
- pavelludiq 10y agoDepends on your problem, experience level, and the context of your overall architecture, team or a million other factors. Apply thought liberally :)
- shakna 10y agoLisp is a family of languages. CL doesn't define all Lisps. The two big families tend to be Common Lisp and Scheme. * Clojure - Immutable, functional, has pattern matching. * Common Lisp - Mostly just multiparadigm, with a leaning towards Object Oriented. * Scheme - More functional than Common Lisp, less Object-Oriented. (Though Guile tends to have an OO leaning, through its extensions.) * Racket - Has a mix of lazy, static typed and other sublanguages. * Picolisp also deserves an honorable mention. It is somewhere between Common Lisp and Scheme, with some clever language features of its own. It's mostly functional, with decent C/Java FFI and a Datalog-like library for OO.