From: Eivind Eklund Date: 2008-02-29T17:23:10+09:00 Subject: Re: Proposed Solutions - Was [ Re: Monkeypatching is Destroying Ruby ] On Thu, Feb 28, 2008 at 9:02 PM, Trans wrote: > > 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 made a suggestion for this a few hours ago. Looks like it got lost > in cyberspace :( Oh well, I'll be extra brief this time, but > reiterate the idea: > > class Array > def to_csv for FasterCSV > #... > end > end > > [].to_csv #=> NoMethodError > > space FasterCSV > > [].to_csv #=> useses FasterCSV's version > > space Ruby > > [].to_csv #=> NoMethodError > > Anything defined in FasterCSV would automatically use FasterCSV space > (use 'space Ruby' to get pure space). I like this one. I see two issues that still needs to be resolved: 1. How to get at several spaces. 2. What's the speed penalty involved? Eivind.