I think we all agree that we do not think that an extension of SRFI 177 that allows to set the default value is helpful.

Orthogonal to this is the question whether a procedure taking keyword arguments shall have the means to detect whether a particular argument was supplied.

Am Mi., 4. März 2020 um 18:33 Uhr schrieb Lassi Kortela <xxxxxx@lassi.io>:
> - an implicit closure is created and the expressions generating default
> argument values are evaluated in that closure, remembering the old
> values (as in Python above).

Sorry, the Python example evaluates the default value expression once
only. It's also possible to evaluate the expression afresh every time a
default value is needed, but if it refers to variables inside some
closure, the semantics are confusing.

(defun proc1 (&key (foo foo)) ...)  <-- what happens?

(defun proc2 (&key (foo 1) (bar (+ foo 1))) ...)  <-- what happens?

These questions have answers in CL, but those answers are not obvious.


--
Prof. Dr. Marc Nieper-Wißkirchen
 
Universität Augsburg
Institut für Mathematik
Universitätsstraße 14
86159 Augsburg
 
Tel: 0821/598-2146
Fax: 0821/598-2090
 
E-Mail: xxxxxx@math.uni-augsburg.de
Web: www.math.uni-augsburg.de/alg/mitarbeiter/mnieper/