George Neuner wrote on 1/7/19 1:12 PM:
Your examples look a lot like what is possible using Lisp's generic functions: specifically "before", "after" and "around" functions.

Before/after/around are what I call "advice".  Advice is a lifesaver when you need it and there's no good documented interface.  For example: "I really-really-really need that one function in that library I use to work differently, but I'm not allowed to modify that library, and I plan to quit this job before anyone else sees my code or tries to update to a new version of that library".  But I don't think of advice as good for documented and maintainable code for software engineering.

Perhaps half of programming language features and engineering processes is giving us non-advice ways to accomplish our goals. :)

(Now I'm bracing for a funny thing that sometimes happens.  If you mention something that can be done, but that you discourage, it gets in people's heads, and some people also read up and experiment with it, which gets it more into their heads, and, the next time people are solving a problem, and different solutions are popping into their heads... this can lead to the discouraged thing being done more than if you'd never mentioned it at all.  It's like if the language documentation for Racket discusses `eval` prominently, even with discouragement, and then `eval` is in new programmers' heads as a tool to use, before they really understand what are almost always better ways, like a baby velociraptor climbing over a litter of puppies, when what you ultimately need is a nice family dog.  Crud; I might've just done it again. :)

--
You received this message because you are subscribed to the Google Groups "Racket 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to