From: djberg96@... (Daniel Berger) Date: 2004-06-09T03:23:38+09:00 Subject: Re: Interfaces and semantics (or, how to hashpipe a duck) "Sean O'Dell" wrote in message news:<200406080736.32485.sean@celsoft.com>... > On Tuesday 08 June 2004 06:04, Daniel Berger wrote: > > "Sean O'Dell" wrote in message > > > > I published an "interface" module a short while back. You can find it > > on the RAA or at: > > Mine looks pretty close to how yours works except it verifies the number of > method arguments. Whenever a method is added or removed, the compliance flag > is lowered so the next time has_interface? is called, a complete check is > re-done to be sure the object still complies. Is yours written in C? One > thing I wanted was for this to have as little overhead as possible, so I > didn't feel like I was slowing down my project too much by calling it > everywhere. > > Sean O'Dell It's pure Ruby. I don't think adding arity checks and hooks for method_added/method_removed would be difficult. Regards, Dan