Comment by twic

1 day ago

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.

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

  • I think it would make sense to have a keyword that permits unsafe instantiation specifically for the edge cases where initialization is too expensive. But I think it makes sense for the lazy case to be a little bit safer.