logoalt Hacker News

twic04/23/20251 replyview on HN

I interpret "don't allow unintialized locals when declared" as meaning that this call:

    int n = scanf("%d %d %d", &x, &y, &z);
Would be caught, because it takes references to undeclared variables. To be allowed, the programmer would have to initialize the variables beforehand.

Replies

dwattttt04/24/2025

Then people would complain about the wasteful initialisation of out-params. Foolishly, perhaps

show 1 reply