From: Paul Prescod Date: 2001-11-23T05:08:57+09:00 Subject: [ruby-talk:26173] Re: Linux Magazine article Michael Schuerig wrote: > >... > > I take this to mean that one can add new methods to existing Ruby > classes without changing the original code. This seems like such an > innocent feature, but one that can be incredibly helpful -- and sorely > missing in languages that don't support it. Forget about all those > static "helper" methods that you need to write in other languages. Just > add the methods you need to the classes where they belong. What if one of your co-workers is using the same class and adds a different method of the same name accidentally? Unless you have a solution for that, I think that helper functions are a safer approach. Classes are "global variables". When you start mutating them you run into the same problems you run into with other mutable global variables. You need to exercise project-wide discipline which is typically quite difficult. Paul Prescod