My problem with AOP has always been that it makes the simple case trivial and the hard case much harder.

Looking at transactions: The 99% solution is trivial: Every service call is a transaction. AOP can save me a few lines for every method and things look much cleaner.

But then comes the huge excel upload that is performance critical. Batch more service calls to fetch additional information in the background, commit every so-and-so records in a loop depending on the data size, do a custom roll-back if things fail.

And suddenly this whole separation of concerns breaks down and creates a huge mess.

The simple case saves a few minutes, the complicated case causes weeks of depression. Not a good tradeoff from my experience.

An LLM adding to the confusion by only sometimes getting things right and explaining that the separate documents are always valid, except when they are not, well, sounds like a fun experience.

I always thought AOP was super cool, but also that it completely destroys readability and the ability to understand a codebase. I also think it's probably one of the worst concepts to embrace in the age of agentic coding. That would be like a foot missile.

There are a limited number of patterns that absolutely do benefit from AOP though. The obvious one is logging. I don't think there's many though.

Regardless, AOP is the last thing I'll be using these days. With LLMs I've been moving in the opposite direction with a focus on explicitness and correctness. Typed, compiled, non-null languages with clear, obvious, and well documented conventions.

I've feel like AOP is Spring on steroids. Same downside for both IMO.

[dead]

This is a retread of the 'animal-cat-dog' inheritance stuff we learned in our intro to OOP classes, where some people got together and put forward their own idea of programming as 'the way forward'.

And me, like others have tried structuring our code like this, and failed, assuming the fault lay not with the idea itself but our skill level. Of course, by now it's kind of common knowledge that inheritance isn't a thing that can and should be used to solve every kind of problem.

Same thing with AOP - it might be sometimes nice, but on the whole, elevating this to the language level seems to be counterproductive.

>it's kind of common knowledge

If only.

yea it's amazing how many goofy ass "senior engineers" are still cargo-culting inheritance.

Aspects are one of those categories of 'too powerful to be considered', or 'return value not worth the cost of troubles it can bring'.

I completely agree with you, saved stuff is normally trivial, nightmare it can bring down the line makes those war stories that are fun to listen to, but certainly not fun to walk through. I simply skip them despite ie Spring offering powerful ways to manage transactions, logging etc. decoupled from places things are actually happening.

I can imagine it working well in a disciplined team who consists of senior folks knowing their craft. Certainly I have never been part of a team with only such composition.