Implement &allow-other-keys #1370

Open
opened 2025-10-06 23:57:46 +00:00 by fare · 3 comments
fare commented 2025-10-06 23:57:46 +00:00 (Migrated from github.com)

Common Lisp has &allow-other-keys wherein a function can accept keyword arguments it recognizes, yet also record all the keyword arguments it is given, even those it doesn't recognize, so as to pass them to further functions it calls with apply. We should implement this functionality, useful in various OO protocols (but not only): https://www.lispworks.com/documentation/HyperSpec/Body/03_da.htm

Common Lisp has `&allow-other-keys` wherein a function can accept keyword arguments it recognizes, yet also record all the keyword arguments it is given, even those it doesn't recognize, so as to pass them to further functions it calls with `apply`. We should implement this functionality, useful in various OO protocols (but not only): https://www.lispworks.com/documentation/HyperSpec/Body/03_da.htm
fare commented 2025-10-07 00:38:45 +00:00 (Migrated from github.com)

@vyzo Where do I find the code that handles keyword arguments, both in the runtime and the compiler?

@vyzo Where do I find the code that handles keyword arguments, both in the runtime and the compiler?
vyzo commented 2025-10-07 07:36:51 +00:00 (Migrated from github.com)

in the prelude and runtime (keyword-diapatch).

We can use the dssl objects for this marking in the lambda signature, #!key #!rest #!optional.

in the prelude and runtime (keyword-diapatch). We can use the dssl objects for this marking in the lambda signature, #!key #!rest #!optional.
vyzo commented 2025-10-07 07:37:20 +00:00 (Migrated from github.com)

compiler is in various places.

compiler is in various places.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mighty-gerbils/gerbil#1370
No description provided.