Re:My resignation letter as R7RS-large chair
by lispm on Saturday August 19, 2023 @05:05PM
(#37193182)
[ Parent
| on HN ]
Re:My resignation letter as R7RS-large chair
by tmtvl on Sunday August 20, 2023 @05:08PM
(#37202947)
So weird seeing CL code without a bunch of (declare (type (integer 0) n))'s everywhere. That's the only thing which keeps me with CL instead of Scheme (I'm rather fond of syntax-rules, case-lambda, case sensitivity, and being able to do things like...
(define range+ (make-range-merger +))
(define (double-range range)
(range+ range range))
, which I think is a little nicer than (setf (fdefinition range+)
(make-range-merger #'+))
or having to precede range+ with funcall everywhere I want to use it).
Re:My resignation letter as R7RS-large chair
by lispm on Sunday August 20, 2023 @05:52PM
(#37203261)
Personally I find Common Lisp in some cases slightly uglier, but clearer.
(define foo (make-foo))
What is it? A function or a non-function?I prefer the Common Lisp version:
(defvar *foo* (make-foo)
"*foo* is the current input/output foo object.")
It's clear that DEFVAR usually defines a variable and not a function. Bonus: we can document the thing in a standard way.For functions I would define a define macro.
(define foo (make-foo)
"foo is a function with two arguments of type bar, it returns ..."
(ftype (function (bar bar) baz))
Which would expand into a (setf fdefinition), a type declaration and setting the documentation.I prefer the uglier, but better standardized and slightly more practical language.