Advice (programming): Difference between revisions

Content deleted Content added
Line 14:
 
===Concern===
While advice has the potential to introduce confusion, as a piece of advice applied to a function is not apparent to a user who tracks down the function definition to learn about it. In these cases, advice acts almost like a [[COMEFROM]], a joke facility added to [[INTERCAL]] to spoof the [[Spaghetti code|spaghettification]] attendant to the use of [[GOTO]]s. In practice, however, such issues rarely present themselves. [[Upstream (software development)|Upstream]] developers and maintainers of Lisp packages and modules never use advice, since there is no advantage to be gained by advising functions when their original definitions can be freely redesigned to feature the desired behaviour. Advice is only useful in that it enables downstream users to subsequently arbitrarily modify default behaviour in a way that does not require propagation of such modifications into the core implementation's source definition. Additionaly, Lisp systems providing advice facilities generally also provide introspection which return things like docstrings, type signatures, and when relevant, presentlylexically appliedapplicable advice.
 
==Implementations==