logoalt Hacker News

dwatttttlast Tuesday at 9:08 PM2 repliesview on HN

While most hello worlds do not check that the message was printed (which I assume writeStreamingAll does for you), dismissing the rest of the differences as "the others aren't correct" isn't really accurate.

Explicitly passing IO in is a fine design choice, but it's not a correctness issue to say others are wrong to not do so.


Replies

dlcarrieryesterday at 5:42 PM

Also, it's easy to make a C program return the number of characters printed and doesn't hurt readability:

    #include <stdio.h>
    int main(void)
    {
        return printf("hello, world\n");
    }
tester756last Tuesday at 9:17 PM

>While most hello worlds do not check that the message was printed

Should they?

show 1 reply