last day (16 days later) » 

22:32
5
A: Is it important to teach Pointers in a first course using Java?

richardNo Because of the way that you learn, you think of them as fundamental. They are not. Java uses references. You can think of these as being pointers, that must point to a valid object of the correct type or to the null object. But there are other ways to thing of references, e.g. like indexes, ...

It is better to start with simpler, more concrete concepts and then build on that to make abstractions. Teaching abstractions first leaves people without 'references' to comprehend what they are doing. It isn't just how ''I'' learned, it is how everyone learns. New Math failed.
@nocomprende while I agree with what you are saying, we must be interpreting the results wrong. For how do we explain young children programming in scratch without first learning how a transistor works? I think the foundation that we build on can be, how it works (how in this language it is implemented). Or it could be based on, what it does. It is a reference, so it is like a URL, or an index entry in a book.
I learned how a transistor worked first. There were no computers around back then. However, we decide on a level of concreteness which includes the necessary features so that people can visualize what is going on. We use an appropriate mental model. I think that the best first model to mention is: "the computer can only load, store, do arithmetic, compare and branch." Kill the mystery first. Kill it dead away. Then build up the real mysteries. If they ask about how the cpu does what it does, I would kill that mystery too, by explaining gates and transistors. This is appropriate learning.
@nocomprende I can only agree and disagree at the same time. While I don't agree that the only or best way to teach is bottom up. I do agree with the rest. I also think that it may be the best, depending on the teacher, and the way that it is taught.
I'm not sure what you mean when you say that 'pointers are not fundamental'; this is untrue on its face. Buried inside of that reference is a pointer. Also, your link goes to a login wall.
22:32
@BenI. A reference is not a pointer. A pointer is simply one way of implementing a reference. There are other ways that don't use anything equivalent to "a pointer".
@alephzero I may be mis-defining pointer. My academic background largely came from music (where I have my graduate conservatory degrees), and this is an adoptive land for me. I may have conflated a C pointer with the virtually identical thing that the processor actually does with it. I assumed that every action taken with MBR, MDR, MAR (or the like) were all pointer actions. I also assumed that the instruction pointer was, well, a pointer.
@Ben It looks like your understanding of pointers in correct. It is just that this is not the only way to implement references. A URL is a reference, and there is nothing to stop a language implementation using something like, or exactly this. Also if you read the C++ spec very carefully you will not what can and can not be done with references, from this you may notice that there is no guarantee that a pointer is used. The object may not even reside in addressable memory (could be in a register).
Okay, I kind of see where you're going, but... even a url must eventually direct to a server which must direct at some point to a memory address in order to return anything. Hence, at some point, there is a pointer. Even dealing with caching just means replacing a pointer with another, more local one, At some point, there is a memory address.

  last day (16 days later) »