4 ms·
Sorry, I wasn't clear enough. I meant: 1. It might be best not to specify what happens, because 2. if it were specified then people would rely on the specific
by gjm11 7y ago
Sorry, I wasn't clear enough. I meant:
1. It might be best not to specify what happens, because
2. if it were specified then people would rely on the specific order, which would be bad style because it would make code harder to read and be more liable to errors if anyone misremembers what order the iteration happens in.
(But it's true that people might rely on the observable behaviour even if it weren't officially specified, and that would be even worse. Which is why I said "should maybe be left unspecified"; it isn't obvious to me which way is better overall. If it's unspecified then fewer people will rely on it but the consequences each time will be worse.)