Usage Concerns
Some people are opposed to the extensive use of typedefs. Most arguments center on the idea that typedefs simply hide the actual data type of a variable. For example, Greg Kroah-Hartman, a Linux kernel hacker and documenter, discourages their use for anything except function prototype declarations. He argues that this practice not only unnecessarily obfuscates code, it can also cause programmers to accidentally misuse large structures thinking them to be simple types.
Others argue that the use of typedefs can make code easier to maintain. K&R states that there are two reasons for using a typedef. First, it provides a means to make a program more portable. Instead of having to change a type everywhere it appears throughout the program's source files, only a single typedef statement needs to be changed. Second, a typedef can make a complex declaration easier to understand.
Read more about this topic: Typedef
Famous quotes containing the words usage and/or concerns:
“...Often the accurate answer to a usage question begins, It depends. And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.”
—Kenneth G. Wilson (b. 1923)
“Science asks no questions about the ontological pedigree or a priori character of a theory, but is content to judge it by its performance; and it is thus that a knowledge of nature, having all the certainty which the senses are competent to inspire, has been attaineda knowledge which maintains a strict neutrality toward all philosophical systems and concerns itself not with the genesis or a priori grounds of ideas.”
—Chauncey Wright (18301875)