On Thu, Jan 14, 2016 at 11:01:16AM +0100, Kamil Cholewiński wrote: > > Otherwise we can use the approach in sbase which is to have eprintf() > > be equivalent to die() and weprintf() for just the warning version. > > TBH I would find this behavior extremely confusing. The established > conventions seem to be: > > printf - format string and write to stdout > sprintf - format string and put result in buffer > fprintf - format string and write to fd > [... snip 47 other variants ...] > > Contrast with: > > eprintf - format string and write to stderr and exit > > "printf" implies formatting / printing and nothing else. Using one of > "die", "err", etc would be much clearer.
It depends on your background. eprintf() and weprintf() were written by Rob Pike and Kernighan and used in the book "The Practice of Programming".