Hacker News new | ask | show | jobs
by derfniw 2586 days ago
Reuse the literal? (postfix with 'n')
1 comments

You don't want strings that are "digits..n" to automatically deserialize into bigints. What if you have a string like "8n", which is a tractor model, or "9n", which is a smartphone model?

But it would be nice to have literal 8n to convert to a bigint 8n. That's not in the JSON standard though.