Re:JSON5 – JSON for Humans
by papercrane on Sunday December 08, 2024 @10:10PM
(#42362749)
Trailing to signal a floating point seems like to niche of a use case to me. Generally it's best to treat every JSON number literal as a 64-bit float anyway for the sake of interoperability.
Re:JSON5 – JSON for Humans
by SV_BubbleTime on Sunday December 08, 2024 @10:11PM
(#42362761)
Right, you guys say like “naught point three”… sounds just as weird to us as ours does to you.
Still… I can be required to put a zero in, read 0.3, and still think “that’s point three”.
It became quite normal for me to write 0.3 and read it as “point three”. I do agree that the English language makes it less awkward to just skip the zero. It leaves very little room for confusion.
Trailing makes it a floating point type instead of an integer