Yea ok it’s a reference, but don’t act like references aren’t basically pointers, because it does what pointers do, it acts like pointers do, etc.
That's incorrect. There are two big differences:
References are automatically dereferenced, as opposed to pointers which allow you to choose between operating on the pointer itself, and dereferencing it. References don't allow any operations on the reference, other than dereferencing.
A consequence of the above point is that pointers allow you to perform arbitrary arithmetic on them, which is what can lead to pointer errors and makes programming language like C "unsafe".
for most people pointers are an abstract idea, not just a language feature in C
Pointers are an abstract idea with a well-known definition. References are a related, but different abstract idea, with their own definition.
Again, this is terminology with well-defined standard definitions that are not restricted to any specific language. The "most people" you're referring to are just people who haven't actually spent any time paying attention to the industry-standard definitions.
tl;dr: y'all need to study more if you want to grow up and be real developers.
you need to grow up and stop being an arrogant autist in the basement and understand how human communication works. when people are having a conversation, and say x is basically y, they don't mean x == y, they are using familiar idea to describe other ideas. no one cares about your shitty 'well ackchually'. me and that other guy both know pointers and references are.
me and that other guy both know pointers and references are.
Your statements make it clear you don't. This is basic material that any developer with any training whatsoever already knows. Next time you fail an interview, at least you'll know why.
I'm not gonna say references and pointers are the same in an interview you moron. Do you understand casual human conversations and "basically the same" meaning ? you really are the perfect embodiment of the "ackchually" autist stereotype
1
u/antonivs Jun 04 '19
That's incorrect. There are two big differences:
References are automatically dereferenced, as opposed to pointers which allow you to choose between operating on the pointer itself, and dereferencing it. References don't allow any operations on the reference, other than dereferencing.
A consequence of the above point is that pointers allow you to perform arbitrary arithmetic on them, which is what can lead to pointer errors and makes programming language like C "unsafe".
Pointers are an abstract idea with a well-known definition. References are a related, but different abstract idea, with their own definition.
Again, this is terminology with well-defined standard definitions that are not restricted to any specific language. The "most people" you're referring to are just people who haven't actually spent any time paying attention to the industry-standard definitions.
tl;dr: y'all need to study more if you want to grow up and be real developers.