this post was submitted on 20 Nov 2023
1 points (100.0% liked)
Lisp
53 readers
3 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Not sure if you're the author of the linked article, but a description of how the difference between defvar and defparameter is important in a language with a long running modifiable runtime would be useful to audiences not familiar with the topic.
For inside, if you have a script that wants to keep track of the number of widgets made per hour, and you also need a place to define the rate of processing, picking defvar for the former and defparameter for the latter allows you to reload the script in the running instance without losing track of important state. You probably don't want to reset the value of the widget count when you reload the script, but you might want the value set in the parameter to change