A Road to Lisp: Which Lisp
18 points by silcoon
18 points by silcoon
Clojure doesn’t have types, but clojure.spec can be used to describe, validate and generate data without introducing a static type system, useful in large applications.
Nit: Clojure does have dynamic types, it is just not statically typed. Though you may provide type hints for function arguments in order to help the compiler eliminate dynamic dispatch through the (fn [^Int arg] (+ arg 1)) syntax.
People really struggle with this. It's something I've had to explain so many times. Clojure has a whole ton of types. Every value has one! It just uses runtime polymorphism to achieve "dynamic typeness", in the same way that something like Qt does with C++.
When you have a QWidget, you have no idea what actual widget you have. You can do polymorphic things with it, though, and you can ultimately test the derived type if you want. Doesn't mean there are no types.
Common Lisp lacks some conveniences that have become common in newer languages, such as concise literals for a wider variety of data structures, persistent immutable collections, lazy sequences and built-in general-purpose pattern matching.
we can explore libraries on https://github.com/CodyReichert/awesome-cl/
concise literals: serapeum's dict or other libraries bring you { } for hash tables and the like (BTW I don't mind literals. I prefer words, such as dict).
persistent collections: FSet (and more)
lazy sequences: series, gtwiwtg (generators) (and more)
pattern-matching: Trivia
they aren't built-ins except if you build your distribution, like CIEL: https://ciel-lang.org/ (shameless plug)
It’s currently used in …
more companies: https://github.com/azzamsa/awesome-lisp-companies/
also: https://lisp-screenshots.org/
at the cost of slightly slower startup times
that means ±30ms, not the Java-esque slow startup time ;)
I expected more personal opinions and judgments from the author.
Can you elaborate? I thought it was interesting, though as someone who has been using Clojure at work for ~7 years I’m not in the target market.