logoalt Hacker News

michaelcampbellyesterday at 7:40 PM2 repliesview on HN

Looks interesting and fun, but in no instance of any C compiler I've come across is the "classic example" of "hello, world" using `fprintf(stderr, ...)`

To each their own I guess.


Replies

1718627440today at 11:23 AM

I give you `if (0 > fdprintf (STDERR_FILENO, ...))` instead.

But on a serious matter, it's a good thing to tell a beginner that diagnostics belong on stderr, not stdout.

apitmanyesterday at 9:13 PM

Give io buffering an inch and it will take a mile