[Help] What do people mean when they talk of "overrides"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Help] What do people mean when they talk of "overrides"

Jerome Peace
[Help] What do people mean when they talk of
"overrides"

I know this sounds almost like a newbie question. But
I have an important reason for asking.

When I first came on board "overide" was used in the
context of inheritence when a subclass reimplementied
a method it would otherwise have inherited.

Now in the context of packages and Monticello it seems
to mean something quite different. And has come in the
context of its new meaning to have become "evil" or at
least undesirable.

As far as I can make out in the latter context it
means one package overiding a Class>>method of another
package. In otherwords breaking the critical
assumption of packages that each Class>>method appear
in one and only one package.

I don't have great confidence that I have this
completely correct.

So can someone clarify the distinction between the two
meanings? And maybe suggest a different way of
expressing one of them to reduce confusion?


Yours in curiosity and service, --Jerome Peace

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

Reply | Threaded
Open this post in threaded view
|

Re: [Help] What do people mean when they talk of "overrides"

Igor Stasenko
hmm.. maybe 'foreign overrides' or 'external overrides' will be more precise?
or 'cross-package overrides' :)

On 29/04/07, Jerome Peace <[hidden email]> wrote:

> [Help] What do people mean when they talk of
> "overrides"
>
> I know this sounds almost like a newbie question. But
> I have an important reason for asking.
>
> When I first came on board "overide" was used in the
> context of inheritence when a subclass reimplementied
> a method it would otherwise have inherited.
>
> Now in the context of packages and Monticello it seems
> to mean something quite different. And has come in the
> context of its new meaning to have become "evil" or at
> least undesirable.
>
> As far as I can make out in the latter context it
> means one package overiding a Class>>method of another
> package. In otherwords breaking the critical
> assumption of packages that each Class>>method appear
> in one and only one package.
>
> I don't have great confidence that I have this
> completely correct.
>
> So can someone clarify the distinction between the two
> meanings? And maybe suggest a different way of
> expressing one of them to reduce confusion?
>
>
> Yours in curiosity and service, --Jerome Peace
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Help] What do people mean when they talk of "overrides"

Martin McClure-2
In reply to this post by Jerome Peace
Jerome Peace wrote:
> [Help] What do people mean when they talk of
> "overrides"

[...]

I haven't been following the packaging discussions on the Squeak list,
but it sounds like you've got it pretty much correct. In VisualWorks, at
least (where I've been spending more time lately) "override" is used in
both meanings. And in the packaging context, it does mean that a
definition for the same class or method appears in more than one
package, with one package "winning" and being said to "override" the
other definition(s).

It would be better to have different terms for these two concepts.

I won't deny that package overrides are somewhat evil. But they are very
very handy -- there are useful things that almost cannot be done without
them. Defining a good model of override behavior is a first step.

Regards,

-Martin