From: Michael Neumann Date: 2001-09-04T22:46:57+09:00 Subject: [ruby-talk:20864] Re: RCR: non-bang equivalent to []= Tobias Reif wrote: > Do you have a feasible idea, solution, concept, or suggestion? > > Maybe something backwards-compatible for Ruby 1 or 2; > > or just a set of conventions/rules for new public methods in public > classes and libraries. I am not sure if this would help out here. Perhaps it'd be even worse; new libraries would use a different convention than the standard libraries. Then you mix both conventions in your code and mess it totally up. > Maybe: > > All methods that are bang (that are working with and possibly modifying > the original(s)) have an '!' appended to their name. But this will not be compatible. Array#delete, #fill and all the others must be changed to the bang version. Any change to existing method names will break code. A solution would be to introduce #delete! etc.. that are just an alias to #delete. But this would break IMO PoLP. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de