I need to define a protocol for a scientific application based on quantities of various types. I want to use protocols since they abstract my code nicely. Is there a valid way to re-define math operators in protocols, e.g.
just keep in mind that 1) the changes are lexically scoped. That’s a good thing ™ since it contains the statefulness of potentially confusing conventions and 2) the changes are strictly opt-in, you can’t enforce it globally (AFAIK) and 3) they’re not composable. If someone else has a library that does that you can’t use it in the same code block as yours.