From: Sean O'Dell Date: 2004-06-11T03:57:19+09:00 Subject: Re: [ANN] Ruby/Interface On Thursday 10 June 2004 10:57, Mark Hubbart wrote: > On Jun 10, 2004, at 8:33 AM, Sean O'Dell wrote: > > On Thursday 10 June 2004 01:28, Jean-Hugues ROBERT wrote: > >> At 04:55 10/06/2004 +0900, you wrote: > >> > >> Should be implement?() vs implements?() I believe. > >> See include?() for example. > >> That is a nice Ruby idiom. > > > > It's not proper English, but perhaps implement? is more "Ruby." > > After being annoyed with what looked like improper English in > all those #foo? methods, I noticed that you could read them as, say, > "does foo include?" or "does foo respond_to?" etc... They make sense > that way, and are proper English, inasmuch as any programming construct > is proper English :) Interesting way to look at it. Running my eyes over a lot of Ruby methods, I can see that implement? is more correct. However, I noticed that some methods are has_ or is_ prepended to them. I guess when does_ makes more sense, the rule is to eliminate it? Either way, I see the pattern and I prefer the library behave the way people "expect" so I'll change the method names. Just a side-note: I've added pre-defined interfaces for IArray, IHash, IString, IDate and ITime so far. 0.6 will have ITime and IDate and whatever others I add. 0.5 already has those others. Sean O'Dell