Michael Ficarra (2015-05-11T17:38:57.000Z)
d at domenic.me (2015-05-14T17:22:08.924Z)
We all know getters must have no parameters and setters must have exactly one parameter. But I recently encountered a bug in one of my projects where default values were not being properly handled for setter parameters. The only reason it would make sense to allow default values on a setter parameter is if the use case of pulling the setter off the property descriptor was considered. But if that use case was considered, wouldn't the use case of setting an arbitrary function to the get/set fields of the property descriptor be just as valid? For consistency, either FormalParameters should be used in the getter/setter parameter list positions or only BindingIdentifier and BindingPattern should be allowed for the setter parameter.