From: dblack@... Date: 2002-11-14T00:50:04+09:00 Subject: Re: Making Instace Variables Private/Local Hi -- On Tue, 12 Nov 2002, William Djaja Tjokroaminata wrote: > When I am writing Ruby codes myself, it is indeed "fun" to be able to > access the parent instance variables directly (because I truly understand > all the details). But now when I am considering multi-people projects, I > am more concerned about the "robustness" than the "fun factor". > > (I have a feeling that I need to modify the Ruby interpreter to add some > switches such that: > - all instance variables are class local/private > - methods cannot be redifined (at least give some warning) > - classes cannot be reopened > - (others?) > All these are fine for a single-person project; in fact they add to the > "power", "flexibility", and "fun" of Ruby as a "scripting" language. But > I feel I need to turn the switches on for "safety" reason in a > large-scale, multi-people projects.) I happen to like power, flexibility, and fun... but in any case, I'd be very careful in doing this kind of reshaping of the interpreter, since libraries you include may well do the things you'd be hacking out of the language. It might be better to achieve robustness and safety by having coding standards for your group. (I'm completely inexperienced in big projects, so I'm just speculating.) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav