Kevin Goodsell wrote in news:v_zgc.19887$A_4.14887
@newsread1.news.pas.earthlink.net in comp.lang.c++:
Rob Williscroft wrote:
Depricate this:
#include <stdio.h>
int main()
{
printf( "Helow world\n" );
}
Code like this:
#include <cstdio>
int main()
{
std::printf( "Helow world\n" );
}
Personally I'd deprecate any use of printf/scanf-related functions.
Well I've never used scanf, so I really don't care,
remove it, depricate it, enhance it, I'll never notice :).
printf can be safe, gcc has been doing this for years and I
got the impression from a recient comp.lang.c x-post that
many in the C world consider this to be something that
should be expected from a a High Quality(tm) implementation.
In the next standard we may get templates function's with
an unlimited number of arguments (an equivalent of , ...),
so we may be able to fix the "type saftey" problem with
std::printf().
Even better we can write:
template < typename T, template Args ... >
std::shared_ptr< T > std::shared_new( Args );
template < typename T, template Args ... >
std::auto_ptr< T > std::auto_new( Args );
and can depricate new and delete :). (*)
Rob.
--
*) Only /half/ joking.