I have a double-dispatch chain:
x generic: y → y firstDispatch: x → x secondDispatchFromY: y
However this has been added after the fact, so there are direct uses of
the secondDispatchFromY: layer, which I'd like to deprecate/rewrite to use
the generic: one. But if I do so, the intermediate firstDispatch: gets
rewritten in the process, and this results in an infinite recursion.
Is there a way to formulate the rewrite rule to avoid that?
I could make a whole new set of secondDispatchFromYbis: methods, change the
firstDispatch: ones to use those, and then the rewrite would be ok, but it
seems like a lot of noise in the code for a small deprecation…
Thinking of it, this is not really a deprecation, more like an advice on
type less, do more [ | ] http://people.untyped.org/damien.pollet