-
Notifications
You must be signed in to change notification settings - Fork 12
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
Allow multiple patches for the same function #29
Comments
Does anybody have a good idea about the user interface for this? One option would be to have a dynamic variable that one could bind, defaulting to nil, around a definition. Then patches defined with different values for that variable would be distinguishable. We could even make the Thoughts? |
In my opinion, multiple patches to the same function does not make sense. At that point what you have is one patched function, which is still used internally wherever it has been used and a new function you want to use explicitly. Swapping its definition before and after module reloads seems extremely hack-y and error-prone. |
Can you elaborate? Unless some code explicitly extracts the return value of |
Yes, and that is the purpose of this package from what I understand. Not making symbols/defuns have different meanings at different points in time? |
It's a package for future-proofing the operation of overriding the implementation of a function. Sometimes, one wants to override the implementation of a function to different values at different points in time. |
Fair enough. You may also want to add support for temporal logical operations while at it. |
Presently, if you patch a single function multiple times, the definitions will work, but
el-patch
will be unable to validate any but the most recent patch. Ideally we would have a way to distinguish multiple patches to the same function.One use-case for this when one version of a function is intended to be used before its file is loaded and a different version is to be used after.
The text was updated successfully, but these errors were encountered: