From: Jeremy McAnally Date: 2008-12-05T14:05:50+09:00 Subject: [ruby-core:20357] Re: Leave my open classes alone (was Behavior: autoload calls rb_require() directly) Soooo basically you're advocating a Python-like object tree, which is the single trait about Python's language features that makes me burn with rage. "Hey we're totally dynamic OO broo ha ha from top-to-bottom!! Except...er...these few things...and uh...well there are these other things too...that...don't really...uh...go in the same box..." --Jeremy On Thu, Dec 4, 2008 at 7:38 PM, Trans wrote: > > > 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. > > -- http://jeremymcanally.com/ http://entp.com/ http://omgbloglol.com My books: http://manning.com/mcanally/ http://humblelittlerubybook.com/ (FREE!)