From: Sean O'Dell Date: 2004-06-09T05:52:20+09:00 Subject: Re: Interfaces and semantics (or, how to hashpipe a duck) On Tuesday 08 June 2004 13:05, David A. Black wrote: > Hi -- > > On Wed, 9 Jun 2004, Sean O'Dell wrote: > > On Tuesday 08 June 2004 11:23, Daniel Berger wrote: > > > "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. > > > > Probably wouldn't, but I just finished mine and it's released, and it's > > in C. I don't know what to do about the name clash. I can't think of > > another name that works as well, and I have to move on to some actual > > work here. > > It's hard to think of a name that works *less* well, since this one > clashes with an already-available package. I hope you'll consider > renaming it, as a courtesy to Dan and to reduce confusion by potential > users. I will when I have a suitable alternative. Sean O'Dell