3 ms·
JavaScript does not have multimethods and methods are called on objects. It sounds like methods must be purely functional and not use any instance fields. The
by watwut 9y ago
JavaScript does not have multimethods and methods are called on objects. It sounds like methods must be purely functional and not use any instance fields.
The use case I had in mind was that I delete method from one class and create it in another. Then I go through all red in workspace and modify what is needed - sometimes just call the other place, other times remove the call entirely, yet other times conclude that method needs to go back because that two special places that don't have access to the other class instance.
Similar with changing signatures - I add/remove parameters and then go through all reds and decide how to fix them case by case.