From: Trans Date: 2008-12-05T10:38:45+09:00 Subject: [ruby-core:20346] Re: Leave my open classes alone (was Behavior: autoload calls rb_require() directly) On Dec 4, 6:56�pm, Paul Brannan wrote: > Ruby is also about expressiveness and readability. �Often having too > many choices affects culture in undesirable ways. �Perl's motto of > "there's more than one way to do it" actually decreases readability > rather than improving it. > > I'm all for choice, but not without weighing the consequences. �In the > particular case of Fixnum#+, I feel the cost outweighs the benefit. Think out loud a bit here... Needless to say I'm in the camp of maximum openness. I believe it is *the* feature that distinguishes Ruby, and I think David Black's comment was very elegantly put. But as Charles has suggested, maybe we can have our cake and eat it too? What if every class had a "Kernel" parent, in the same way that Object has Kernel (though these "Kernels" might instead be super classes instead of modules, I'm not sure which is best). While the class itself can be overridden, the "Kernels" cannot. If the class is overridden, a flag is set so one can easily check. Likewise Kernel itself would be locked down, but Object still open. Would something like that do the trick? T.