Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some of those could perhaps be solved by an "around" hook, in addition to pre- and post-hooks, like advice[1] in Emacs. Although in OOP maybe that would be represented by a decorator class (or a subclass) that overrides the method and calls the original method?

[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Ad...



https://en.wikipedia.org/wiki/Aspect-oriented_programming

A further elaboration on that idea. I like it, but have used it in a disciplined way. There's some valid criticism of its ability to obfuscate a program. Particularly with the ability to add and remove advice dynamically, making static analysis (to determine why something happens) practically impossible.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: