Comment #0 by supernova2003dh — 2013-11-25T00:11:13Z
The function to!BigInt(string) accepts non-numeric input like "avadakedavra" without throwing an exception.
Expected result:
An exception is thrown.
Actual result:
No exception is thrown, and the BigInt is initialized.
This violates the principle of least astonishment.
Comment #1 by hsteoh — 2013-11-27T18:25:10Z
Wow, this is bad. The BigInt implementation doesn't even check if the given string contains digits, it just *assumes* anything that isn't '_' is an ASCII digit, and simply subtracts '0' from it and treats the result as a decimal value.