2026-04-23 05:53 UTC
Replies (5)
-
@simon_brooke@mastodon.scot 2026-04-23 06:03
@janneke@todon.nl @vnikolov@ieji.de @spook@pleroma.m68k.church (#Scheme is a good #Lisp, though. And certainly a good first-introduction-to-Lisp Lisp).
-
@janneke@todon.nl 2026-04-23 06:16
@simon_brooke@mastodon.scot @vnikolov@ieji.de @spook@pleroma.m68k.church Ah, that makes so much sense; I've always wondered. So that's why so much "Lisp" code looks so terrible...How sad! Thanks for educating me.
-
@pascal_costanza@functional.cafe 2026-04-23 06:35
@simon_brooke@mastodon.scot @janneke@todon.nl @vnikolov@ieji.de @spook@pleroma.m68k.church Sounds like you haven’t programmed much in Common Lisp…
-
@vnikolov@ieji.de 2026-04-23 07:05
On the lesser topic. There are at least two notable things about `setf' (the first one smaller, the second one bigger). I. It eliminates the need for explicit setters. If you know how to write a form to get something, you automatically know how to write a form to set it. II. Modify macros become available. To illustrate with `incf': (let ((h (make-hash-table))) (incf (gethash 'foo h 0)) (gethash 'foo h)) works and evaluates to 1. (Does not fail trying to increment a non-existent element.) This is noticeably different from the typical operation of `+='. See also `define-modify-macro'. I'll leave the greater topic, mutability and immutability, for another day. _________ Disclosure I am a descendant of barbarians, who settled in the old Roman province of Thracia. Civis serdicensis sum. 🙂 #CommonLisp #Lisp @simon_brooke@mastodon.scot @janneke@todon.nl @spook@pleroma.m68k.church @pascal_costanza@functional.cafe
-
@amszmidt@mastodon.social 2026-04-30 16:31
@simon_brooke@mastodon.scot "The imperative style was very much frowned upon" It really was not. It was the normal way of writing code. Bunch of TAGBODY, GOTO and other things. SETF pre-dates Common Lisp by many years. Here is some old fun EH code: https://tumbleweed.nu/r/attic/sys46/file?ci=tip&name=lispm2/eh.316&ln=120-149 That uses SETF. @janneke@todon.nl @vnikolov@ieji.de @spook@pleroma.m68k.church