Comment by twic

Comment by twic a day ago

2 replies

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.
dwattttt a day ago

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

  • da_chicken a day ago

    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.