Post
by lexikos » 19 Jan 2024, 02:12
Noted; however:
Redefining a property is not setting a property. The built-in property already exists, and is rightly not invoked when you shadow it with a new property.
A bound function currently does not impose any restriction on the number of parameters. It accepts whatever parameters are passed, combines them with whatever parameters are bound, and attempts to invoke the bound object. The bound object delegates to the implementation of whatever method (or the function itself in this case), and only then the parameter count is checked.
Rather than (or in addition to) redefining MaxParams, you can redefine Call and impose whatever restrictions you want.