Fix style warning about unknown :FORCE keyword arg to close-channel#697
Conversation
|
Looks good to me, but please write commits as detailed at https://github.com/joaotavora/sly/?tab=contributing-ov-file#commit-messages. @joaotavora kindly asked me follow that guideline. |
f1e15ea to
4da729c
Compare
|
Looks good to me, but please write commits as detailed at https://github.com/joaotavora/sly/?tab=contributing-ov-file#commit-messages.
Didn’t check that, sorry. Should be fixed now!
|
|
I think the right thing to do here is to declare the keyword argument force and ignore it. |
|
I think the right thing to do here is to declare the keyword argument force and ignore it.
I mainly followed the course with &allow-other-keys because one of
defmethods had (... &key), supposedly expressing the open-endedness of
arglist. But alright, I’ll change it.
|
* slynk/slynk.lisp (close-channel): Introduce a :FORCE argument
4da729c to
f004887
Compare
|
The CLHS has rules about the meaning of &key in a generic function. IIRC (but it was a long time ago since I looked it up), a |
|
The CLHS has rules about the meaning of &key in a generic
function. IIRC (but it was a long time ago since I looked it up), a
&key in the defgeneric or in one of the methods of the generic meant
all of them were &allow_other_keys.
No, there’s &allow-other-keys for that purpose. Here’s what I found:
https://cl-community-spec.github.io/pages/Congruent-Lambda_002dlists-for-all-Methods-of-a-Generic-Function.html
Point 5 means roughly what you describe, but it’s for &allow-other-keys,
not &key.
But &allow-other-keys in
general is a code smell, so if we're going to change it, might as well dtrt.
I’m fine with that, thanks for merging!
|
Hi!
Just now, loading Slynk, I got this warning:
The problem was with the initial
slynk::close-channeldefinition (adefmethodin slynk/slynk.lisp) not allowing additional keyword arguments, withslynk::close-connectionproviding a previously unknown argument. So I went ahead and fixed arglists with an&allow-other-keys