Typed Lisp, a Primer
21 comments
·May 4, 2025breadchris
vindarel
just get Common Lisp with this new Clojure collection and sequence API! https://github.com/dtenny/clj-coll
nextos
A modern CL that borrows ideas from Clojure, and with a strongly typed language (Coalton) also available is indeed very appealing!
codr7
The main issue I have with CLs type checking is the clunky syntax and the fact that it looks different in different contexts.
I made an attempt to fix that for eli: https://github.com/codr7/eli#type-checking
gitroom
honestly i kinda love when deep dives like this pop up, makes me rethink stuff i thought i'd settled on - you think things ever get simple with lisp or it always stays quirky no matter how you do it
NikkiA
praising 'loop' in the same post as describing lisp as 'elegant' shakes head
codr7
Some people seem to like it, and be very effective using it.
The problem is it's a walled garden, with its own quirky syntax; nothing that happens inside of loop is applicable outside, and the other way around.
kagevf
My opinion of LOOP started to change when I read (the much maligned) "Land of Lisp" and went over that "periodic" diagram in TFA. Seeing the elements of LOOP broken down like that went a long way to get me to overcome my original aversion to it.
shawn_w
I feel bad for people who haven't discovered ITERATE yet.
Jtsummers
ITERATE still breaks when you use `count` inside it, the built-in CL function. If they ever address that problem I'll get back to use it but having a time bomb in my programs isn't something I like.
Trivial example of breakage:
(iter (for i from 1 to 10)
(print (count i some-sequence)))
shawn_w
Breaks how? I'm on my phone, not a computer right now and can't test, but that should call the CL function - ITERATE uses `counting` for that particular operation to avoid conflicts; see https://iterate.common-lisp.dev/doc/Gathering-Clauses.html
Or is the documentation wrong?
I have really fallen in love with LISP recently, specifically clojure. A strong type system is really needed for it to make me feel like I can confidently develop with it.