C
CBFalconer
Bill said:That's absurd. The very first program anyone learns is:
#include <stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}
There are certainly people who will argue that it should
be written with puts instead of printf, but printf is generally
introduced right at the start.
If you mean that people shouldn't write variadic functions
until they know how, I would agree. But simply avoiding
them out of hand would be severely restrictive.
Variadic functions are dangerous because there is no way to check
that they are called correctly, especially when the format string
for printf is a variable. Better languages ensure that all
parameters are properly typed and checked. Pascal achieves the
same effect without the vulnerabilities, by specifying a standard
abbreviation for multiple simple calls. Unfortunately the
successors to Pascal, which include Modula and Ada, do not have
this simple and reliable mechanism.