4 ms·
AoP strikes me as one of those things where someone just invented a bunch of terminology around a really basic concept, for no good reason. Aspect? Advice? Joi
by makmanalp 12y ago
AoP strikes me as one of those things where someone just invented a bunch of terminology around a really basic concept, for no good reason.
Aspect? Advice? Joinpoint? Pointcut? Really?
As far as I've been able to understand, AoP is just hooks. You can hook something before or after a function, or 'around' it which is a combination of both. Super useful, but really not that amazing or novel. Definitely does not warrant its treatment as some kind of separate type of programming.
...
Small nitpick with the article: In the example given, the call timing uses 'around', which measures the entire function as opposed to just the part of it that the initial function was measuring, right?
- girvo 12y agoIt really reminds me of Wordpress' hook system... And that makes me want to run away screaming, as the maintenance and testing nightmare that that entails has easily removed a decade off my lifespan.
- ajkjk 12y agoWe use a lot of AOP at work and explaining all the arcane terminology to new engineers is always a nightmare .. but it's necessary to work with basic libraries. So I totally agree.
- rtpg 12y agowell, in AOP you can describe situations such as "when f is called within g". I think it's a lot more complex than just hooks. Whether this extra descriptive capability is a positive thing is an open question (well, considering AOSD (Aspect-Oriented Software Developement) confernce changed to Modularity, maybe the question has been answered negatively)
- nmrm 12y agoI think a lot of the research around AOP was doing all this stuff, but with static checking. Which gets less trivial pretty quickly, and the distinctions become necessary. But I agree in spirit.
- makmanalp 12y agoSo this is a fair point. With the dynamic / runtime variety it is not an issue. If you really needed the static variety (which is fair if you have a billion points hooked), I think that's a tiny subset of a more generalized problem about a language's static-analyzability, which matters in many other contexts anyway, like in-editor linting.
- jasode 12y ago>, AoP is just hooks. Yes, that's a valid perspective. But it's an incomplete one. Your reduction of AOP is highlighting the mechanism (hooks) but ignoring the purpose (the SOC separation of concerns). It is the goal/purpose that motivates the separate umbrella label of "AOP". The hooks happen to be one implementation detail. I'm also not a fan of creating a barrage of neologisms (e.g. see Thomas Friedman books) but the thinking behind AOP generating its own terminology seems reasonable when compared to other concepts if we mentally separate the "hooks" from the "goal": hooks: insert instrumentation before & after lines of code goal: performance statistics and optimization hooks: insert code to mark memory regions with setinels goal: memory safety check -- detect buffer overruns and wild pointers hooks: extern "C" ABI, or Win32 COM, or Wordpress plugin specification goal: extend software functionality by heterogeneous programming languages, or 3rd party developers With those examples, reducing "goal" concepts down to hooks such as "3rd-party software plugins are just hooks", and "performance instrumentation are just hooks" isn't adding information to why programmers are doing it and also doesn't explain why separate tools are created to support it. Therefore, unifying (reducing) a dozen disparate computer science concepts down to "hooks" isn't going to help us. Getting past the "hooks" component and focusing on the larger concept (goal) in a systematic way may let us make advancements in its use (tooling, business ROI to implement, etc.)
- seanmcdirmid 12y agoThe purpose of most work in programming language abstraction is separation of concerns, it's not like we weren't doing that before someone coined another name for modularization and a new mechanism (AOP) for doing that.
- jasode 12y agoI'm not an AOP practitioner or apologist (Greek definition) but I think that AOP is emphasizing separation-of-concerns that are non-functional and non-core algorithm. Logging, audits, safety, etc. This is different emphasis of thinking from the abstraction/modularization of passing a custom compare() as a function pointer to quicksort(). I believe that speaking of AOP as an isolated concept is reasonable. Whether it reduces down to "hooks" or reduces even further down to assembly language "mov, add, jmp" instructions is not that interesting to me. We have text editors that are 1-dimensional and linear. The programming code is not in "layers" like layers in Photoshop or AutoCAD drawings, and yet we're trying overlay N-dimensions of concerns throughout the code. We have some crude attempts such as text editors outlining collapse/expand of code regions (code folding). We have syntax coloring of programming language keywords but not of the higher-level concerns. Can the tools make this better?! Maybe. We (the computer scientists and programmers out in the real world) are trying to figure out how to interweave all this in a sane way. A focus on this issue of coding all the N-dimensional cross-cutting concerns will naturally lead to a umbrella concept that's researched in isolation.[1] I don't believe in AOP as the The Next Big Thing. I also don't believe reducing it to just "hooks" adds to the research about it. [1]https://www.google.com/search?q=n-dimensional+concerns+programming https://www.google.com/search?q=n-dimensional+concerns+progr...
- tinco 12y agoIn science you give something a name so you can reason about it more easily. So yes, really.