TL; DR
Pointer is a low-level abstraction mechanism that contains a memory address for any object. This address is his focus and this value can be manipulated freely by the application as any data. Many languages totally hide their existence.
Reference is a more abstract concept and not always visible in language. It creates a data set formed by the object that is its focus and the reference that indicates where the object is. This reference may be composed of a pointer. The manipulation of the reference is limited, including because it gives preference to the manipulation of the object.
They are two ways to conceptualize something very similar and often the same. This has implications on the details of use, but they serve the same purpose.
Introducing
I do not have information based on published reliable studies, so to answer me Baseio mainly on Wikipedia and what I have always learned.
I will try to give a universal interpretation that seems to me to be the intention of the question and not for a specific technology and show when it is something specific of a language without going into details.
Pointer
Pointer (in English) is a more concrete construction. It exists even at the lowest level of programming. A processor handles pointers. According to Wikipedia, a pointer - or pointer to the guys and girls of the old continent - is a value that refers to another value allocated in another area of memory.
I don’t like this definition very much because it implies that pointers only point to data. Okay, anything on the computer somehow can be considered a given, even code. But it’s not an unambiguous interpretation. So I prefer to see the pointer as a pointer to some area of memory. But I like that it quotes memory. It seems to me that the concept of pointer is more specific to memory. Although I myself use the term in other situations, it seems more appropriate that it be used only for memory treatment.
Some languages allow direct manipulation of pointers to a greater or lesser degree. We can say that this is one of the ways that help classify languages by their level of abstraction. That is, if the language manipulates the pointer in a very liberal, concrete and direct way, the language is lower level, as is the case of the Assemblies. Other languages such as C, C++, D, Rust, Go, Pascal, just to stick to some examples, also make liberal use of pointers but with some limitations and each with less incentive, providing other more abstract ways to get the same result. Other languages completely abandon the manipulation of pointers, such as Java, Python and Javascript. Others impose major limitations, such as C#. These languages are higher level.
Probably C is the language mainstream that most encourages and that most popularized the use of pointers. In fact C has no references (directly). And many definitions of what is pointer will be confused with what is used in C.
Pointers are always values, so pointer type parameters are passed by value, that is, the address saved on the pointer is copied. There’s an independence from what he’s pointing out. When you refer to the pointer, you are referring to the address contained in it. If you want the object of this address, you need to make this explicit.
It is common to use pointers for performance, after all it approaches concrete processing. One of the common pointer operations is arithmetic, so it handles access to memory positions very easily and quickly. Of course, there is always the risk of some operation being irregular and causing unwanted results. Pointers aren’t usually safe to manipulate indiscriminately. Although its flexibility to do, even, potentially irregular operations is what gives it great power. Great power, great responsibilities. The programmer has to know everything to do and how to do it. He does not automate "nothing".
But make no mistake, the pointer is still an abstraction. The pointer is a form of if reference objects in memory.
Reference
One reference (in English) It seems to me to be something broader. You may have references to something that goes beyond memory. Even in memory you may have references that alone cannot be considered pointers. Reference, as the name says, refers to something, but that something can be more free. The Wikipedia article says that it is an object that contains information that indicates data stored somewhere else rather than containing the data itself.
A reference is composed of two parts. An address indicating where the data is and the data itself. This is different from the pointer that has no direct relation to the die. You don’t do many operations with references, you don’t have arithmetic, for example. You can change the reference value but you cannot manipulate it freely. Of course in memory a direct reference will probably be implemented via a pointer. But it is possible to have a reference other than a pointer.
The reference is a more abstract concept and so depending on how it will be used this level of abstraction may be a little different. The way you deal with this reference may be different. In some cases the programmer might even ignore that it is a reference.
One thing I learned from reading Eric Lippert’s excellent articles is that a reference should be interpreted as a alias for a given, for an object.
That is, it’s just a name we give to the object. And you can have as many aliases want for him. Having only one alias has implications on how the data will be manipulated. Of course internally this alias will probably be manipulated with pointers but the shape will be different and mainly, will not be programmer problem.
When we say that we pass something by reference, it means that we pass the reference value - there is a copy of the reference, but our intent is to pass on the data to which she refers. It is common even in lower-level languages that have their own reference mechanisms not to give direct access to the reference address, because it is not important but its referenced data. Hence references are much safer than pointers. When we access a reference, it is implied that we want to access your referenced object. It’s even a matter of clear semantics.
In very low-level languages, like Assembly and C, they don’t have mechanisms that deal with references, you simulate them with pointers. In others, such as C++ and D, this can be done explicitly. In the highest-level languages their use is so opaque that the programmer can even use them without having science that is using a reference. It doesn’t really matter how much the language hides the implementation, if it’s a reference, it’s much easier to manipulate than a pointer. The fact that it is less flexible, gives more guarantees, many concerns are unnecessary. And even the compiler can benefit since it can be more aggressive because of the guarantees provided by the mechanism, which can facilitate having a performance gain.
References often have additional information in addition to the address where the other party is. At least its size and the type of information contained in that part are common, even if the information is only available at compile time, in the simplest languages.
C++ is probably one of the languages where differentiation is most important since it explicitly has both pointer and reference. In C++ pointer and reference are data types. Of course some languages have references embedded in other mechanisms. As is the case of a Slice de Go. But it’s not that C, for example, has no references, it just doesn’t have a specific mechanism to treat them. They are conceptualized and manipulated by the programmer’s complete discretion.
Both pointer and reference are indirect.
Nomenclature exchange
Everything we do in data structure uses references. And until it needs to be made explicit that it is accomplished through a pointer, this should be the preferred nomenclature. I and half the world exchange terms when it is not the most appropriate without causing great harm or misunderstanding. In documentations and other formal publications the misunderstanding cannot occur.
The intention of this answer is not to exhaust the subject, but only to resolve the differences of terms since we all use it all the time and do not always stop to think about exactly what they are.
Completion
As I started, I have no way to say, I have never read anything canonical and indisputable on the subject, I would even like to see something like this, but what I can help is to show that they are different concepts, one is a concrete mechanism, powerful and flexible and the other is more abstract, more secure (more automated), more universal, and easier to understand.
Reference, in higher-level languages such as Java, is a more abstract concept that indicates an indirect data, not even a mechanism accessible to the programmer in most of them. Pointer is one of the most concrete mechanisms used to implement the reference. It is important to have some awareness about the functioning of references to avoid surprises but it is not necessary to deeply understand their functioning. We can say that in these pointer languages, strictly speaking, should not even be cited. Not that I am preaching alienation of the programmer.
I do not know if I fully answered the question and I know that this answer cannot be considered definitive. Not that it is wrong either. But I believe that the links provided help start looking for more information on the subject.
Difficult to choose, but I accepted this answer because it is not only quite complete but - although extensive - clearly highlights the main difference between the concepts in my opinion (see the parts in bold). The other answers are also good, in particular that of Miguel Angelo - more concise and didactic, but less precise and more focused on C#.
– mgibsonbr
I think exactly the same :P I did not improve mine afterwards because it would seem envy :) But you should have chosen the least voted, so it ends with the seriousness of *site once and for all. Humor is good at the right time and place. The place, an answer was not the best, but at the right time, all right, the moment has passed, solidify it was a bad decision. What was to generate lightness, generated a weight.
– Maniero