B
Bob Hutchison
Hi,
I am writing a library for Ruby programmers. What are the issues with
adding methods to the Object class? I'm not talking about the
practicalities of it -- those are as easy as could be and work. What
I am concerned with is the reaction a programmer using that library
might have. The benefit is a simplification of a particularly error-
prone, tedious, ugly, and repetitive test in the library user's code
(that might not show up in unit tests). I don't know what the
disadvantages might be, name conflict I suppose. Any others? Any
guidelines as to when extending standard classes is considered okay,
or not? Is there an expectation in the Ruby culture? is this kind of
thing considered rude, or worse?
Cheers,
Bob
I am writing a library for Ruby programmers. What are the issues with
adding methods to the Object class? I'm not talking about the
practicalities of it -- those are as easy as could be and work. What
I am concerned with is the reaction a programmer using that library
might have. The benefit is a simplification of a particularly error-
prone, tedious, ugly, and repetitive test in the library user's code
(that might not show up in unit tests). I don't know what the
disadvantages might be, name conflict I suppose. Any others? Any
guidelines as to when extending standard classes is considered okay,
or not? Is there an expectation in the Ruby culture? is this kind of
thing considered rude, or worse?
Cheers,
Bob