Component/s: Standard Library
In order to stringily a double roundtrip-safe, we need up to 17 decimal digits. But Double#description
of current Swift (on all platforms) gives us one digit short.
As you see in the attached screenshot, Playground is okay. So is REPL.
Perl 5 and Python 2 have the same symptom:
While most other modern languages do not:
- Java http://ideone.com/OSeb5S
- Python 3 https://repl.it/BcFb/0
- Ruby http://ideone.com/BrfiBO
IMHO this is rather an undocumented feature than a bug but with JSON so ubiquitous and all of its numbers are doubles, we should make Double#description roundtrip-safe.