-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configuration: Have define-configuration add just one handler per slot. #2451
Conversation
@aartaka OK with you? |
I'd say they should indeed. If there's a single handler per slot, how could the user change the value of a slot at runtime? I don't remember now, but don't we generate new objects when using |
True in the |
No, I don't agree! The change with |
I'm confused, what's the point of setting all the values for the same slot? I mean (setf slot-foo 17)
(setf slot-foo 18) is the same as (setf slot-foo 18) |
What about this? (setf slot-foo (append 17 %slot-value%))
(setf slot-foo (append 18 %slot-value%)) This use-case is enabled by the current implementation, and I don't want to let it go! |
Oh right... Then I suggest one change: to have one handler per slot and to name the handler after the slot: this way it makes hook introspection and editing much easier. |
"one handler per slot"? |
Currently Does that make sense? |
Yes, I see. Then I totally agree with this! |
You mean you agree with my last proposal, but not this pull request as it is, right? |
Yes, I don't agree with deleting the same slot handlers, but I agree with splitting slots into their own handlers! So the course I'd be content with is removing the |
Superseded by #2480. |
Description
Currently calling
define-configuration
multiple times over the same slot has no effect.This patch ensures there is only one handler per slot.
Discussion
add-hook
of nhooks should probably do this handler replacement for us.Checklist:
Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.
EDIT: Added more discussion.