From: Dan Sugalski Date: 2003-06-05T05:07:07+09:00 Subject: Re: ruby-dev summary 20201 - 20315 At 2:34 AM +0900 6/5/03, Chad Fowler wrote: >On Thu, 5 Jun 2003, Paul Brannan wrote: > >> On Wed, Jun 04, 2003 at 06:50:39PM +0900, Mauricio Fern�ndez wrote: >> > Why not do >> > >> > myArray = Array.clone.freeze.new >> > >> > and then implement irb w/ myArray. >> > That way changes in Array don't affect the interpreter. >> >> IMO, this is indicative of a more general problem than just IRB. If >> one module changes Array, code in another module might not be compatible >> with those changes. Ideally it should be possible to isolate changes to >> builtin classes to a single module. I'd wager that's even harder to >> implement than it sounds, though. >> > >This topic came up at RubyConf 2001 during David Black's Ruby Behaviors >talk. David Simmons (creator of SmallScript or S#) suggested the need for >something called "selector namespaces", which has been discussed (with >David's input) in ruby-talk:18567. It's actually not all that difficult under some circumstances, but there are some costs associated with it. Basically what you need is both lexical namespaces and namespace overlays. Not a trivial task, by any means, but doable if you need it. (Whether it's worthwhile or not is a separate issue, of course) -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk