don't need to count realised parameters#12
Conversation
|
It was intentional to throw an error when the setter gets zero arguments; that shouldn't be valid for any setter. I can certainly use the "is present" verbiage tho. |
|
There are 3 existing built-in setters in the language and none of them throw when the parameter is not present. |
|
Sure - that doesn't mean that's a good precedent, it just means there's precedent to be sloppy. There's precedent to coerce, too, but we chose to change that because it was a bad decision - similarly, having a function that should only ever be called with precisely 1 argument noop when called with zero seems like an oversight to me. (it's also notable that one of those is legacy, and the other two are web compatibility hacks - so probably not great examples to look at for precedent anyways) |
|
Closing, per today's plenary and 377c7e7 |
This is simpler and doesn't introduce new phrasing. I've also changed the semantics when the argument is missing from throwing to no-op.