3 ms·
For me I am the exact opposite. You might ask me what a delegate is and I might say, "Uh... I don't remember." Yet it is something that I use every day in my
by NathanKP 17y ago
For me I am the exact opposite. You might ask me what a delegate is and I might say, "Uh... I don't remember." Yet it is something that I use every day in my programming, I just don't usually think of it as being a delegate.
I was fascinated when I took my first C++ class and learned that using a pointer was called referencing and dereferencing. I had been using C++ for years on my own and had always thought of it as:
x = &y; //X equals the address of Y.
x = *y; //X equals the value at the address Y.
To me that made more sense than calling it "referencing" and "dereferencing".
- ams6110 17y agoExactly the same. I also never really thought that pointers were difficult yet it seems to be a major stumbling block for many beginning C programmers. Perhaps having already done assembly language programming before I learned C was the reason.
- NathanKP 17y agoRight, in that same class most of the rest of the students simply could not seem to understand pointers. They asked me, a fellow student, questions like "Why would you ever use pointers?" The thing was, I think my lack of "jargon" made me explain the answer better than the professor did. Hence the other students asked me, not the professor. It seems to me that fancy terminology such as "referencing" and "dereferencing" is not only not common sense, but it also makes it harder to understand things when you are starting out. Perhaps as professional programmers it makes it easier to talk about algorithms between each other, but jargon is generally for the sake of exclusivity, not for the sake of convenience. I would even go so far as to suggest that anything that can be said with jargon can probably be said better with simple language. What beginning programmers are learning these days is jargon, and the definition of jargon terms, but they aren't learning what the meaning of those terms is. There is a big difference between learning the definition of something and learning its meaning.
- ramchip 17y agoAs you say using it early into an intro programming class may be a mistake, but it's soon useful in that you can say 'don't dereference b, it might be null' instead of something like 'don't attempt to read the data located at address b, b might be a null pointer'. Are you sure about 'referencing' though? I've never heard it in this context. It could be confusing given how C++ has references has well.
- billswift 17y agoSure, that's like people being able to talk long before they learn what nouns and verbs are. A matter of learning to use something versus learning and remember terminology to describe that something.
- ldite 17y agoBeing self taught, I spent years thinking that; x = &y; // Referencing x = 0; // Dereferencing Which seemed much more logical, but led to trouble when the internet came along and I started having thoroughly confusing conversations with other people.
- NathanKP 17y agoWow, that does make a lot of sense. I can see why you would think that way. Well, that goes to show the joys of being self taught.
- cabalamat 17y agoYeah, I'm not a big fan of the term defererencing. There ought to be a better word for following a reference. (This question is of practical interect to me -- I'm currently designing a language that has a dereferencing operator deref() and am wondering what better name to give it.)
- Dilpil 17y agoI've always thought dataAt(x) would be more correct then dereference(x)