This sounds very interesting. How much runtime control would we have over attribute values? Could runtime change of attribute trigger a jit, or would this become unstable and/or poor performance?
-Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Stephen Touset Sent: Wednesday, January 12, 2005 10:36 PM To: Rodrigo B. de Oliveira Cc: [email protected] Subject: Re: [Mono-list] Implementing attribute-based code generation Rodrigo B. de Oliveira wrote: >It sounds like you are talking about what we call syntactic attributes. > > I couldn't tell from the website. Essentially, I am trying to add design by contract support to the mono C# compiler (as an extension, rather than a core patch to mcs). The best way to do this would seem to be to have attributes that can modify methods. In other words: [Precondition("o != null")] [Postcondition("size > 0")] void AddObject(Object o) { // ... do stuff ... return; } Which would then at compile time insert void AddObject(Object o) { Check.Require(o != null); // ... do stuf ... Check.Ensure(size > 0); return; } While also obeying design by contract inheritance rules. _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
