This expression is taken from a talk given by the late Robby Villegas. The UpValues
to some symbol a
is defined below as:
ClearAll["a"];
a /: _[___, a, ___] := (Print["a fired"]; Null)
Nothing I tried could Clear
the definitions associated with the symbol. Is there a way to clear the associated UpValues.
UpValues
to symbols is outright dangerous. Speaking from experience here, I have tried to use this kind of rules before, and it was invariably biting me later - so I never ended up leaving such constructs in final code in whatever I was doing. $\endgroup$