logoalt Hacker News

Zakyesterday at 4:07 PM3 repliesview on HN

Pointers are famously difficult to learn and reason about even though the basic principles are simple. Programming in a style that requires direct manipulation of pointers when it's not actually necessary is usually regarded as unwise because it's so hard to get right.


Replies

mhjklyesterday at 4:49 PM

OP had no problem with pointers prior to trying C++. I think there is a case to be made that C(++) makes pointers unnecessarily confusing and there is no real disconnect between understanding pointers in theory and in practice otherwise

show 2 replies
t-3yesterday at 8:05 PM

Pointers aren't hard, it's C/C++ that make them complicated. Addresses and indirection in any assembly language are simple and straightforward, easy and even intuitive once you start actually writing programs.

show 1 reply
KellyCriterionyesterday at 4:53 PM

...thats the reason why I love managed environments like C#/Java/etc :-))