From: Brent Roman Date: 2009-02-16T07:03:32+09:00 Subject: [ruby-core:22168] Re: A short memorandum (Re: 1.8.7 Specifics) Charlie, I'm proposing that each GC implementer exports a set of methods to tune their GC and documents these. In doing so they strive to invent the fewest number of new methods, finding the greatest overlap between their special needs and the methods that others have already documented in their specialized GC modules. They must never redefine the meaning of a method that another implementation has already used. The result is flexible for GC implementors and, most importantly, applications don't need to know the specifics of the underlying implementation to tune its GC using its published methods. Whether or not apps writers choose to "litter their code" with checks is something we cannot control anyway. If you require apps to load implementation specific GC extensions, apps tuning the GC need to know a priori about specific implementations. If there are not standard contracts across implementations, then these apps must handle each specially. This sounds to me like a recipe for spaghetti code and will not be very maintainable. Every new GC implementation will require that apps writers tweak their GC tuning code to work with it. I think we've both clarified our points of view. I'm ready at this point to agree to disagree and let others decide. - brent Charles Oliver Nutter-2 wrote: > > Brent Roman wrote: >> The GC module *is* Ruby's API to its "automatic memory management". >> Even a ref-counted implementation would have some user tweaks. >> And, if it didn't, the ref-counting GC would simply define a GC module >> with >> no methods. >> Easy. > > The problem is an ever-growing set of methods you have to check for. If > JRuby exposed several new methods on the GC module, people might litter > their code with checks for them. And then IronRuby. And Rubinius. And > MacRuby. As more methods are added, code gets cluttered with conditional > checks for each of them rather than a single load attempt or defined? > Const. That doesn't sound very nice to me. Keep impl-specific methods > out of the public, default set of APIs. > > - Charlie > > -- View this message in context: http://www.nabble.com/-ruby-core%3A21997--1.8.7-Specifics-tp21961585p22028316.html Sent from the ruby-core mailing list archive at Nabble.com.