ChatGPT is also split...:
Given the circumstances, I would recommend extending define-method
rather than introducing define-method*
.
Here’s why:
Consistency and Simplicity: By extending define-method
, you avoid creating a dual system where users have to choose between define-method
and define-method*
. This reduces cognitive overhead and makes the API cleaner.
Backwards Compatibility: As long as the extension maintains backwards compatibility—e.g., methods defined without optional, keyword, or rest arguments continue to work as before—there’s minimal risk of breaking existing code.
Ease of Use: Users generally prefer fewer forms to remember. Adding more features to the existing define-method
aligns with the principle of least surprise for anyone using GOOPS.
Future-Proofing: Creating a parallel form like define-method*
could set a precedent for duplicating functionality every time a significant feature is added, leading to API bloat over time.
The counterargument might be that adding optional, keyword, and rest arguments complicates define-method
’s semantics. However, if these features integrate naturally and don’t break current assumptions, the benefits of a unified approach outweigh the risks.
My confidence in this recommendation is 85%, as the best decision ultimately depends on the specifics of your user base and how GOOPS is typically used. If there's significant risk of confusion or breaking changes in the extension, introducing define-method*
might then become a better option.