[squeak-dev] Re: Overrides. Evil. Need to do something with it.

Andreas Raab andreas.raab at gmx.de
Wed May 5 16:07:53 UTC 2010


On 5/5/2010 8:52 AM, Igor Stasenko wrote:
> On 5 May 2010 18:35, Andreas Raab<andreas.raab at gmx.de>  wrote:
>> But if anything I'd push the responsibility the other way around. Show a
>> warning when you *commit* a package. That way the developer gets to see it
>> every time they save a new version and hopefully learn about it and avoid it
>> in the future. Punishing the user of a package doesn't sound like a good
>> idea to me.
>>
> err.. how you think its possible? Suppose that i implemented some
> extension method.
> Then someone else implemented a very same extension method for very same class.
> And then user tries to load these two packages one after another and
> so, depending of order of loading
> this method will be mine or somebody's else.
> And depending on order of loading, a package which loaded first, will be broken.
> So, you wanna warn developer, like:  'hey.. you know, that there's
> somebody else can implement the same extension method?'

I think we're talking about different things. What I referred to is 
'-override' categories in Monticello, commonly referred to as 
'overrides'. It seems you mean situations where the same method is 
defined in multiple conflicting packages (what I would call 'method 
stealing')?

In this case, yes, you're right there's no way to anticipate that. I 
guess informing the user that loading package B conflicts with package A 
would be one way to address this (in the same way that missing 
dependencies are handled, i.e., giving you the option to proceed through 
but strongly discouraging it).

Cheers,
   - Andreas



More information about the Squeak-dev mailing list