3 ms·
The most critical prerequisite to being a good C developer is to really understand pointers on an intuitive level. The biggest block is that most people don't t
by dcolkitt 6y ago
The most critical prerequisite to being a good C developer is to really understand pointers on an intuitive level. The biggest block is that most people don't take the effort to develop mental fluidity. So when they see something like a dereference to a pointer of a pointer, or a cast from a pointer to an array, it interrupts flow while they consciously work out what's going on.
- mywittyname 6y agoPersonally, my major issue with pointers is the C syntax for them. While I understand why the & and * symbols were chosen for the task way back when, but it feels like a kludge. Smart pointers in C++ provide a more logical and consistent interface for using pointers.
- Layke1123 6y agoI would be really interested in reading about why & and * were used as the symbols for pointers when C was originally conceived. Can you share a link or point me in the right direction for why that is? Please and thank you!
- zokier 6y agoI'd say the most critical thing is to understand the relationship between ISO C standard, compiler implementations, and you, the programmer. Understanding that "seems to work" is not good strategy to deal with C, nor is trusting that things work in a sensible manner. Seeing how nasal demons might lurk at every corner. Distrust all advice and guidance that is not founded upon current C standard and/or compiler documentation. If you internalize that mode of thinking, then pointers will be just a minor detail in the end.