From: hemant Date: 2008-02-29T02:04:16+09:00 Subject: Re: Proposed Solutions - Was [ Re: Monkeypatching is Destroying Ruby ] Hi, On Thu, Feb 28, 2008 at 8:29 PM, Sam Smoot wrote: > I'm with James on this, the wins from Ruby's flexibility far out-weigh > the downsides. I am with James on this as well. Open Classes is a feature and as I said I love it. > On the other hand, I don't think I've seen a suggestion quite like > this before. It's pretty neat actually I think. Like a poor-man's > selector-namespaces. > > Now if we ever did get selector-namespaces, then I'd be completely > against this. But since it appears we're _not_ getting the feature, > this isn't a half-bad substitute IMO. I am with you here. If we can get selector-namespaces, we wouldn't need this. Although in case of overriding method defined in parent class, 'def!' could still be useful. > > Except for the "ruby throwing up" part. Collissions should be > warnings, not fatal errors. Otherwise, like you said, you eventually > may not have the source for a lib, so you wouldn't have a choice but > to abandon it or hack in something like: > > require 'faster_csv' > Array.send(:undefine_method, :to_csv) > > I'm not saying this def! idea is really needed... but I do thing it's > pretty novel an idea, and I don't see any downsides. > > -- Let them talk of their oriental summer climes of everlasting conservatories; give me the privilege of making my own summer with my own coals. http://gnufied.org