
----- Original Message ----- From: "Mohammed" <miqbal@accessme.com.jo> To: "Boost mailing list" <boost@lists.boost.org> Sent: Tuesday, February 10, 2004 10:26 AM Subject: Re: [boost] Interest in aspect oriented library
I may be wrong. AOP can be used to implement design by contract.
Mohammed
Most definitely. In the crosscutting macro I am proposing at ( http://www.heron-language.com/aspect-cpp.html ) we could add class invariant tests to the BeforeFxn and AfterFxn of the aspect. We could then also have precondition tests in the BeforeFxn and postcondition tests in the AfterFxn. The only issue is that an aspect applies uniformally to a set of functions (the set of join-points, known as the point-cut). In order to overcome this we need to simply write a case statement in the BeforeFxn / AfterFxn on the passed function name. I am currently working on a new more powerful model that will make it easier to do design by contract using AOP. Christopher Diggins yet another language designer http://www.heron-language.com