What does the de- prefix in dereference mean? Is there a linguistic explanation for it?

空扰寡人 提交于 2019-12-11 11:09:54

问题


I learned that * is the value-at operator and & the address-of operator. Formally known as dereferencing and referencing. Whenever I talk to someone I trip over the word dereferencing, because it reminds me of the word referencing and then I get confused. I know from how I learn that if I know what the de- prefix of dereference means I won't have this problem anymore.

In the same manner I learned what ante means in poker or what an antagonist and agonist is in neuroscience (and theater w.r.t. antagonist).

Another reason I trip up is because from my (limited) understanding the de- prefix in dereference seems to imply a deletion of a reference, which is not the case.

So what does de- mean? Is there a linguistic explanation or is it an ad-hoc prefix with no meaning other than differentiating from reference?

Possible duplicates: this question and this one but I'm not asking for the definition of dereferencing. I'm asking what the prefix means in the context of the word (edit: and also in the technical context, I'm not interested in dereferencing a real book, whatever that means).


回答1:


Not a linguist but here goes. First, from google:

de- a prefix occurring in loanwords from Latin ( decide); also used to indicate privation, removal, and separation ( dehumidify), negation ( demerit; derange), descent ( degrade; deduce), reversal ( detract), intensity ( decompound).

The de- prefix here means to negate what follows. Similar to an un- prefix (do / undo). So when we use the & operator, we take a reference. When we use the * operator, we de-reference. We undo the reference operator to get the variable again.

*(&foo) == foo: de(reference(foo))



来源:https://stackoverflow.com/questions/35372786/what-does-the-de-prefix-in-dereference-mean-is-there-a-linguistic-explanation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!