4 ms·
I'm not an expert C developer but can see some semantic benefits of typedefing a pointer. Is this considered harmful because it hides the fact that you're deal
by bitcharmer 7y ago
I'm not an expert C developer but can see some semantic benefits of typedefing a pointer.
Is this considered harmful because it hides the fact that you're dealing with a pointer in the first place?
- raxxorrax 7y agoAs evidenced by countless examples of somethingPTR-types, it is done regularly. But the main problem is indeed that you hide the pointer. If you apply qualifiers like const to your type, results might me unexpected. It might have semantic benefits, but C developers should be trained to ignore all these strange *-symbols anyway.