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

Igor Stasenko siguctua at gmail.com
Wed May 5 15:52:08 UTC 2010


On 5 May 2010 18:35, Andreas Raab <andreas.raab at gmx.de> wrote:
> On 5/5/2010 8:12 AM, Bert Freudenberg wrote:
>>
>> On 05.05.2010, at 07:15, Igor Stasenko wrote:
>>>
>>> 2010/5/5 Stéphane Rollandin<lecteur at zogotounga.net>:
>>>>>
>>>>> myMethod
>>>>>   <doNotOverride>
>>>>
>>>>> What you think?
>>
>> I think that's nonsense ;)
>>
>> Overrides are evil, period.
>>
>> I'd simply make loading an override a warning the user has to click
>> through. That will teach package authors to not use them willy-nilly. For
>> private use they could override the warning, but their users will probably
>> be annoyed which is a Good Thing.
>
> It's not that people don't understand that overrides are evil. It's that, at
> times, if you want to ship something there is simply no alternative. And
> yes, I *hate* them.
>
> 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?'

> Cheers,
>  - Andreas
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list