Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24903

Re: "to override"

Newsgroups comp.lang.java.programmer
Date 2013-08-04 18:18 -0700
References <override-20130804185710@ram.dialup.fu-berlin.de> <51fe8e13$0$299$14726298@news.sunsite.dk> <agyh2srfewht$.12cldilsmzoct.dlg@40tude.net>
Message-ID <0292050a-c8d6-4819-b4f3-537cedbfc76f@googlegroups.com> (permalink)
Subject Re: "to override"
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Joerg Meier wrote:
> Arne Vajhøj wrote:
>> On 8/4/2013 1:01 PM, Stefan Ram wrote:
>>>    Is it true that the meanings of »override« and »overwrite«
>>>    do overlap somewhat?
> 
>> I don't think so.
> 
>> Override is a commonly used term for subclasses providing a new 
>> implementation for a method.

It's also the precise word for that phenomenon in the Java language.

In a somewhat circular definition, "override" is the term for which 
the '@Override' annotation applies.

The JLS distinguishes this from other kinds of hiding, namely "hiding" 
itself, "shadowing" and "obscuring".

On another front, the ability to override methods in a subtype is essential
to the notion of object-oriented programming, at least in languages that have 
methods.

>> Overwrite is commonly used for files, but for methods I would

The term "overwrite" in Java and other computer programming contexts applies
to the replacement of data or information with other data or information.

One could philosophize that the two terms are related, but in usage they 
have particular contexts and denotations that must be respected.

>> be puzzled about what "overwriting a method" actually meant - it could

It's not a standard Java term.

>> mean override, but I would start to suspect some advanced byte code

It had better not mean "override", because there is already a term for what 
"override" means, and it would be improper to use a term with a different 
meaning for that meaning.

>> manipulation actually replacing the code of a method.

It would have to mean something distinct from "override", or else it is not 
a legitimate usage in a Java context. Certainly the person using the term 
"overwrite a method" has a responsibility to explain what they mean, since it 
is not a standard Java term.

> I would also use overwrite in the context of assigning a new value to
> (primitive) variable, which overwrites the existing value, as well as in

In the JLS, "overwrite" appears zero times.

> various hardware related aspects (such as overwriting a shader program or
> overwriting a graphics buffer).

Your assumption is not unreasonable but would need confirmation by whomever 
is using the term.

>> A bit of googling indicate that using overwrite for override
>> is a German language thingy.
> 
>> http://answers.yahoo.com/question/index?qid=20120324072506AANp0CA
> 
> I don't know if that is true.
> 
> As a German, born and raised, I can confirm that both words typically
> translate to the same German word ("Überschreiben", if you will forgive my
> use of the Umlaut). When translating back, that often causes mistakes. It
> is the same kind of problem as we have with pronouns - a lot of native
> English speakers have immense trouble using der/die/das correctly, because
> they only know 'the' for all three cases.
> 
> Similar mistakes you will often see from us Saxons is us driving bicycles
> (because both driving and riding translate to 'fahren' unless actual horses
> are involved) and peace pigeons (because doves and pigeons translate to
> 'Taube').

Actually, a dove is a type of pigeon, so it makes sense.

Anyway, in English "overwrite" means to replace with different writing, and 
"override" means something more like "overrule" or "take over control".

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: "to override" Arne Vajhøj <arne@vajhoej.dk> - 2013-08-04 13:23 -0400
  Re: "to override" Joerg Meier <joergmmeier@arcor.de> - 2013-08-05 01:40 +0200
    Re: "to override" Lew <lewbloch@gmail.com> - 2013-08-04 18:18 -0700

csiph-web