On Jan 24, 2006, at 2:21 PM, Eero Saynatkari wrote:

> James Gray wrote:
>> Daniel Berger and I have been having an off-list discussion about his
>> memoize.rb library.  You can find that library at:
>>
>> http://raa.ruby-lang.org/project/memoize/
>>
>> In the course of the discussion, I ended up building a library of my
>> own, to show Daniel what I was talking about.  Daniel thought it
>> might be worth moving the discussion of my new library here, to get
>> community feedback.
>>
>> < snip feature discussion due to RForum />
>
> Good stuff! The only idea I have just from an end-user
> perspective is that you could hook into Module#append_features
> to enable using #include instead of #extend at the class
> level (this should also allow just using #extend on individual
> objects without having to explicitly open the singleton class).

That's an interesting idea.  It does seem this is what extend() is  
for though and it's certainly been used like this in the past (see  
Forwardable).

I do like the idea of not having to use the singleton class on  
individual objects though.  Hmm, wait, doesn't that work now...   
<checks>  Yep, seems to.

What do others think, is extend() okay in the classes?

James Edward Gray II