I think taste is one possible reason. Personally I find this:
printf("%8d: %s\n", customer->id, customer->name);
more readable than this:
std::cout << customer->id << ": " << customer->name << std::endl;
There's also the issue with localization. printf
makes it possible to change the formatting to suit other languages and UI cultures, which becomes a major chore with iostreams
, unless you use something like the Boost Format library.