Aspect Oriented Programming (AOP) seems like an interesting concept. At first I was pretty enthusiastic about it, but as I read more and saw the use cases people were describing I grew disappointed.
A lot of sites I saw, plus a presentation from the developers of AspectC++, presented use cases that I found rather dubious.
They talked about how AOP can be used to do error handling (throwing exceptions), do bounds checking on parameters and return values, return safe null objects in case something goes wrong, security, etc. Are these just bad examples (and not actual use cases), or am I missing something?
How are you supposed to be aware of what's happening when you call a function? Virtually anything can happen, depending on what aspects you decide to apply. Isn't that going to mess up things really really badly? What about API documentation, how am I supposed to write that?
So far the only good use cases for AOP I've seen are things like logging or profiling — things that don't influence the actual logic flow and serve only as debugging tools.
Is AOP useful for anything else other than debugging mechanisms?