On May 29, 11:59 ¨Βν¬ Δαξιεμ ΔεΜοςνΌδαξ®®®ΐδαξ΄²®γονΎ χςοτεΊ
> trans wrote:
> > Besides the issues you mention (new API and adoption), I see other
> > reasons something like this isn't going to make much headway.
>
> > 1. You can use -w ruby option to get warnings about methods that are
> > redefined.
>
> > 2. Raising an error on a method redefinition is too much. There are
> > times when that's what you need to do, say to temporary patch a bug.
>
> Really? Raising an error is too much? Consider that if you get this
> warning, what it really means is that you just clobbered someone else's
> method and their code will most definitely fail because of this. If this
> isn't the time for "fail fast" then I don't know what is. Clobbering a
> method (for example to patch a bug) should be the exception case; then
> you could easily undef the method before defining your patched version.

I don't think there's anything wrong with your assessment. That
certainly is an option. It would be interesting to know Matz' reason
for not raising an error, and instead just issuing a warning when a
method is redefined.

Perhaps the reason is subtle. If I load extension lib A before
extension lib B, I am giving B priority over A in so far as they
conflict. If errors were raised instead, as you suggest, I would
simply not be able to use the two together without first undefining
all the methods of lib A for which they may conflict. That could be
very annoying, especially if there a number of conflicts and I was
only interested in using a few methods from each lib to begin with.

-Tom