NilsBossung/phobos — comment on commit b1c121dbb01da9989e25225615a97c2a8688e4cf
File: std/conv.d line 1974
By NilsBossung:

When only checking for `s.empty` before the loop, it would not be considered an error when the loop is entered, but breaks before consuming the first character. That means, `"foo"` would be accepted as 0, which is not desired.
I don't think `i` overflowing is an issue, because Loverflow is triggered long before that happens.