← Back to context

Comment by troad

20 days ago

Many thanks for taking the time to show those features off, it's very kind of you and I genuinely appreciate it. I spent about two hours playing with SBCL and its documentation / inspection features, inspired by the examples you gave, and another hour reading some docs. Very neat! Aside from reading a book on CL some time back, my most significant (but still quite peripheral) experience with Lisps has been Clojure, and while I feel like Clojure has better onboarding, I must say that CL feels much more pleasant to actually work with. (If I never see another Java stack trace, it will be too soon.)

I do very much like the named and typed arguments. I took the liberty to do some further reading about SBCL's capacity for compile-time type checks [0], which is a pleasant surprise. I did some quick experimenting, and was also quite impressed with SBCL for catching function calls passing unknown keys at compile time, before the call is invoked.

Perhaps the fact that many Lisp guides feel compelled to start with a terse implementation of lambda calculus might actually be somewhat of a disservice, in hiding the more practical side of the language?

[0] https://lispcookbook.github.io/cl-cookbook/type.html

> Many thanks for taking the time to show those features off, it's very kind of you and I genuinely appreciate it.

:-)

> was also quite impressed with SBCL for catching function calls passing unknown keys at compile time, before the call is invoked.

Generally CL compilers tend to check argument lists at compile time. Number of args, correct keyword arguments, ...

SBCL is especially good, due to its further support of declarations as assertions and its support for various compile time checks. You'll also get Lisp backtraces in a natively compiled Lisp then as a bonus. Also for newcomers it is quite helpful, because SBCL gives a lot of warnings and other feedback for various possible problems (from undeclared identifiers, unused variables up to missing optimization opportunities).

> Perhaps the fact that many Lisp guides feel compelled to start with a terse implementation of lambda calculus might actually be somewhat of a disservice, in hiding the more practical side of the language?

That's true. Lisp was often used in education as a vehicle to learn things like lambda calculus (or similar). Practical programming or "software engineering" with Lisp wasn't part of those courses.

There are books which cover those topics, too. Like "Practical Common Lisp" by Peter Seibel, "Paradigms of AI Programming" from Peter Norvig or "Common Lisp Recipes" by Edi Weitz.

For SBCL one definitely needs to read the manual to get an idea about its extended features.

  • Thanks again! :) I’ll do some reading, maybe pencil in a simple little project for fun and experience. (A nice little MUD/MOO server, perhaps.)