
Infrequently Asked Questions in comp.lang.c - dfox
http://www.seebs.net/faqs/c-iaq.html
======
tetha
Hm, I don't agree with some answers.

For 1.1: Which integer type should one use? This depends. Do you need space?
Use the smallest one possible. (char, short, ...) . Do you need speed? Use the
natural integer type for the machine (int). Do you need a large value range?
Use the largest one (long). Do you know no clear answer? Use the simplest one
(int).

For 1.9: check out forward declarations instead of brittle structs where you
need to check if the sizes fit.

For 2.1: This is a very, very weak reason. No mention of type safety? No
mention of mistype-safety for the enumeration indexes? No mention of increased
maintainability?

For 2.9: What? C data has to be byte aligned, thus those "holes" are required
by the standard. Unions and structs just cannot be interchanged. Am I confused
on this one?

Too bad I don't have time to go through all of this, but this appears to be
pretty weak. Read it with care, and don't read it at all if you cannot care
due to a lack of C-fu.

