On Tue, 20 Dec 2005, Joel VanderWerf wrote:

> SASADA Koichi wrote:
> ...
>> [ruby-dev:27991] GC.always
>> 
>> Akira Tanaka proposed "GC.always" method.  This method forces ruby
>> interpreter to invoke GC whenever it is invokable.  It means that GC
>> will be invoked at every object allocations, every memory allocations.
>> This feature helps interpreter debugging around GC bugs.
>> 
>> Matz refused "GC.always" method name (didn't refused this feature, only
>> method name).  Another proposed method name is "GC.debug".
>> 
>> This issue is still open.
>
> This would be helpful for extension writers. Would the method take a block, 
> to turn on the feature only for suspect code?
>
> GC.every_allocation
> GC.aggressive
> GC.eager
> GC.leave_no_garbage_behind
> GC.fanatically_tidy
>
> Come on creative people, this is a softball question!


i really, really prefer an options based approach to these kinds of things.
when you have to pick a name for every method the development is slowed.  pick
a catch-all and configure it:

   GC.gc(:mode => "every") do

   end


next week, when someone wants a new feature, it can be added it without
changing a thing:

   GC.gc(:mode => "every", :pool => MyCustomPool) do

   end

etc.

food for thought.

-a
-- 
===============================================================================
| ara [dot] t [dot] howard [at] noaa [dot] gov
| all happiness comes from the desire for others to be happy.  all misery
| comes from the desire for oneself to be happy.
| -- bodhicaryavatara
===============================================================================