Hey all, The feature I appreciate most about the D programming language is its "Design by Contract" feature. Contract programming - Dlang Tour With the recent merge of Contracts to GCC master, C++ comes close to this, with support for function-based contracts. The most powerful contract though, is the "invariant" contract: *invariant() is a special member function of struct and class types that > allows sanity checking an object's state during its whole lifetime:* > > *- invariant() is called after the constructor has run and before the > destructor is called.* > *- invariant() is called before entering a member function* > *- invariant() is called after exiting a member function.**- Class > invariants are inherited. That means that a derived class invariant will > implicitly call the base class invariant.* I'm very interested in prototyping a GCC plugin to implement support for transforming all member function calls in class/struct types such that a call to the [[invariant]]-annotated function (if any) is placed at the beginning and end of method bodies. Does anyone have any idea whether something like this would be suitable for a first plugin, or if there would be roadblocks/technical challenges to implementing such a thing? I'd be grateful for any advice. Thank you, Gavin =)