Spiros Bousbouras said:
There were extensive discussions in the original ANSI C committee. void
by itself already existed in C++ and was generally regarded as a good
idea. void * was, as I recall, a C committee invention to fill the need
for a "generic" pointer that freely converts to and from other pointer
types to allow for library functions like free() and memcpy() to be used
without requiring casts while still preserving type safety for the other
pointer types.
So the committee introduced a new pointer type out of the blue. Wow ,
that's a bold move. Certainly bolder than adding a depth argument to
continue or break which was not done. From the C99 rationale:
6.8.6.2 The continue statement
The C89 Committee rejected proposed enhancements to continue
and break which would allow specification of an iteration
statement other than the immediately enclosing one on grounds
of insufficient prior art.[/QUOTE]
Adding a depth argument, in my opinion, would have been a really bad
way to implement multi-level breaks. It would make far more sense
for continue and break to take a *label* as an optional argument.
(There's ample precedent for that in other languages.)
Still, if you're arguing that the committee shouldn't have added void*,
I'll just say that I disagree; in hindsight, it's worked out quite well.