From: Sean Russell Date: 2001-05-26T23:51:57+09:00 Subject: [ruby-talk:15760] Re: Ruby Programming Practice On Sat, May 26, 2001 at 12:40:05PM +0900, John Kaurin wrote: > But in a general Ruby programming view, where one programmer > is controlling all the files, is it good practice for a superclass to > use a method (or instance variable) defined by a derived class? > This does not seem to follow from the library designer view. Well, I'd say that this is not good programming practice. Better would be to define an interface for the method: class A def methodA methodB end # Override this method def methodB end end Or document that class A expects that subclasses will import a given module. Probably the best thing of all would be to make A a module, rather than a class. The difference is almost one of semantics, but conventions often determine what is "good" and what is "bad". --- SER