From: Chris Cummer Date: 2007-12-20T03:15:12+09:00 Subject: Re: [Rhetoric] Two feature requests for safer Ruby Programming On 19-Dec-07, at 6:18 AM, Sylvain Joyeux wrote: >> I was aware of this, but what I also meant was: >> >> class WarningAlreadyExists >> def bla >> end >> end >> >> >> class Foo < WarningAlreadyExists >> def bla >> end >> end >> >> Doesn't give any warnings, even with warning flag on. > Of course it does not. You may have to learn some basic object- > oriented > principles before complaining about robustness issues in languages. > Reimplementing a method in subclasses is the basis of polymorphism and > is the way to go in *all* object oriented languages I know of. Sylvain is correct. The "danger" you're objecting to here is in fact exactly the desired behaviour. Often a programming language can protect a developer but in this case, if the over-riding were undesirable, then the error would be in extending a class that the developer does not yet fully understand, and not with the programming language. Regards Chris