DEV Community

Discussion on: Explain C Pointers Like I'm Five

Collapse
 
gregdavidson profile image
J. Greg Davidson

This is wonderful! It is more general than C/C++ - if you were to create a more general version I would definitely reference it. (I've used and taught C since 1976 and C++ since it was called "C with Classes" but now I prefer Rust.) The one quibble I would make is your distinction between pointers and references: I normally see references as simply syntactic sugar for pointers, but if you want to emphasize their non-nullable characteristic, you could have the reference "sent" by sending a picture of the property with its address (written on the curb?) showing.

Collapse
 
codemouse92 profile image
Jason C. McDonald

I have considered splitting this off into its own article for some time, so I think I'll do that.

I like the idea of the reference analogy, but I also want to make it clear there isn't a tangible "thing" being stored. Hmm...