Overwrite or override

This may seem like a silly question, but I'm just curious, and I want to use the correct term when it comes to a problem. Could not find a similar question, so I decided to create a new one.

Should we refer to "replacing the implementation" with rewriting or redefinition? Does it depend on the language?

+98
override overwrite terminology
Dec 28 '11 at 3:33
source share
5 answers

The common word used is Override, and it is language independent, as you can also read from wikipedia: http://en.wikipedia.org/wiki/Method_overriding

+27
Dec 28 '11 at 3:35 a.m.
source share

If you completely replace one implementation with another, it β€œ rewrites ” or more often β€œ replaces ”. If you replace the implementation with another for some specific cases, it " overrides ".

To " rewrite ", you need to put something in its place, destroying the rewritten thing. To β€œ redefine ” something must make something else act in its place, without harming or changing the redefined thing.

+116
Dec 28 '11 at 3:44
source share

This is my understanding of the differences between rewriting and rewriting in terms of a real example:

Suppose you have a car manufacturer. You are famous and satisfied with your customers, as they always trust you and buy your products.

To continue your business, you have basically 2 options:

  1. All things go, and you know that you are on the right track. Thus, you want not only to keep the previous models, but also to continue to improve them. Although, how did it happen? Perhaps adding some new features to existing models! Now new models have all the features, as well as new advanced features.

  2. You know that the path you went through was kind of wrong! what a terrible approach !! You quickly notice that the company must change the whole technology, otherwise it will experience harsh situations (for example, bankruptcy or so ...)

In the end, from a programming point of view, the first approach relates to overriding, as you add a few new BEHAVIORS to your cars, preserving the old behavior that the car had, while the second approach relates to rewriting, because you want to change the behavior (I) completely and develop new features from scratch.

Hope this helps you.

+11
Nov 17 '16 at 19:53
source share

Both are common concepts. Override is the prevention of some previous actions or decisions, and on the other hand, Overwrite refers to what is written on something previously written.

in simple words

Actions and decisions are reevaluated.

Information is overwritten.

+7
Dec 02 '15 at 6:57
source share

I think that if there was any context, it would be much easier to understand and distinguish it.

From APUE:

POSIX.1 also indicates that abort cancels blocking or ignoring the signal by the process.

From the Bing dictionary:

override sth: use your authority to reject decisions, orders, etc.

Here redefinition means that it β€œignores” something with its highest authority. abort does not replace the process signal mask; it simply β€œignores” the restriction with higher permissions.

So I think redefinition and rewriting are two different words. dubbing should be the word for replacing old content.

0
Apr 04 '19 at 10:21
source share



All Articles