Hacker News new | ask | show | jobs
by Vindicis 2961 days ago
I don't think really anyone has difficulty understanding the concept of a pointer. It's their usage that trips people up, and that most tutorials I've seen gloss over, which is where all the confusion stems from.
1 comments

Exactly. There is the concept and the syntax of pointers, and those are relatively straightforward to understand. I gave up on learning C++ — twice — when I was a kid because no book explained why there are pointers. It’s all very “a pointer points to something! Now on to the next chapter.” (The third time was the charm, luckily.)

One simple example showing value semantics would’ve made it click for me, and things only get more interesting when you talk about performance.