[squeak-dev] Overrides in newest Monticellos?

Bert Freudenberg bert at freudenbergs.de
Sun Jul 13 21:06:56 UTC 2008


Am 13.07.2008 um 22:53 schrieb Colin Putney:

>
> On 13-Jul-08, at 1:01 PM, Janko Mivšek wrote:
>
>> Hi Colin,
>>
>> Colin Putney wrote:
>>
>>>> I'm willing to migrate to such MC immediately if available. I think
>>>> working with overrides is such a powerful feature (not to mention  
>>>> that
>>>> VisualWorks have that) that Squeak needs the proper support as  
>>>> soon as
>>>> possible.
>>> MC2 doesn't have a concept of overrides as such, but it does allow  
>>> packages to overlap, and uses versioning history to determine  
>>> which of the two versions of a method should be used.
>>> I'm doing the final clean up for the first release, which will be  
>>> Real Soon Now™.
>>
>> That means if I extend some method in another package and it  
>> happens that the method has the same name (this is regarded as  
>> override in VW for nistance), MC2 will deal with that situation  
>> right and won't change an original package as that this method is  
>> removed there?
>
> Right, more or less.
>
> There's really no distinction between "orignal package" and  
> "overriding package." Only one variant of the method can be loaded  
> at a time, but both packages will consider the method to be part of  
> the package.
>
> A common case will be wanting to change a method in another package.  
> Say I have a web app in AIDA/Web, and I want to change on of the  
> base methods. I add the method to my package, and make my change.  
> When I save a snapshot of my web app, it'll include the history of  
> that method, and as long as the base version doesn't change, my  
> version will supersede it. But if you then change the method in AIDA/ 
> Web, I'll get a conflict when I load my web app, which I'll have to  
> resolve, by choosing your new version, my existing version, or some  
> new version that I write taking both into account.


Actually, PackageInfo looks back in the changes file for previous  
versions of the method belonging to other packages. The whole point of  
overrides is that if you override a method in another package, that  
package is *not* changed.

Yes, that does sound fragile because it is.

- Bert -





More information about the Squeak-dev mailing list