On Mon, 2009-06-01 at 04:15 +0200, Michael Bruck wrote: > The 'struct foo_s' syntax is code bloat that obscures the actual > algorithms. 'foo_t' is shorter.
I assume you prefer u32 over uint32_t, then? ;) Nevermind.... I think 'struct foo' is much more clear when reading and writing code. > Doxygen seems to recognize the foo_s and foo_t version as one an the > same, I don't see what problem you have there. However it will just as > happily accept foo_t only, like in > > typedef struct {} foo_t; The problem with the documentation is the fact that there are two types that refer to the same thing. The current scheme imposes extra effort for new developers to realize that many blah_t types are structures, and there is not immediate way to tell them apart without digging into further into the documentation or code. I think the Wikipedia page on typedefs does a good job of explaining the reasons to avoid them in this particular case: http://en.wikipedia.org/wiki/Typedef Neither of the K&R guidelines for using typedefs are met in this case: 1) These types do nothing to aid portability; they add no value here. 2) These types do not make a complex declaration easier to understand. If anything, they make a simple declaration unnecessarily opaque. Cheers, Zach _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development