3 ms·
I don't know whether this was the author's intent, but it's better to start simpler (not in designs but in concepts - arguably, structs are simpler than funky n
by delinka 14y ago
I don't know whether this was the author's intent, but it's better to start simpler (not in designs but in concepts - arguably, structs are simpler than funky naming conventions) for the beginner and less experienced dev. The struct method is a powerful one, yet not one grokked simply by the neophyte. There probably needs to be a Part II.
- tptacek 14y agoOn the contrary, setting up a regime of specially-named functions is error-prone and clunky, and structures with function pointers are a language idiom in C, and, finally, if you're too new to the language to understand function pointers, you can't use either technique, because both rely on function pointers. Ultimately, the real problem is that teaching bad designs to people because they're new to the language is counterproductive.