Anyway, I was reminded of that old HN post because I keep typing opt-level = 2 in Cargo.toml files and getting an error since opt-level is a string. For a human-friendly config format, I think I'd rather have schemas than types. It also solves the backward compatibility problem where you prematurely use a string type because you don't know if you'll need the flexibility in the future. You see this right now with the workspace.resolver field where it's string typed but valid values are numerals.
Maybe we shouldn't have built the world's standard interchange format on one language's choice to only offer floating-point numbers (outside of typed arrays like Int32Array). You're basically left with stringly-typing your scalars if you want to have an actual interchange format.
@pervognsen floating-point isn't the problem here, fixed-width types are. This wouldn't be any different if JS had "Int32" as its universal number type.
@steve I completely agree. If you're going to have numeric types in a format like this they should be actual numbers. Arbitrary-precision integers, and decimal floating-point if you're going to accept decimal notation for fractional numbers. Unfortunately that would probably lose in a "worse is better" way.