Why doesn't ANSI C have namespaces?
问题 Having namespaces seems like no-brainer for most languages. But as far as I can tell, ANSI C doesn\'t support it. Why not? Any plans to include it in a future standard? 回答1: C does have namespaces. One for structure tags, and one for other types. Consider the following definition: struct foo { int a; }; typedef struct bar { int a; } foo; The first one has tag foo, and the later is made into type foo with a typedef. Still no name-clashing happens. This is because structure tags and types