3 ms·
> To the point that I don't understand why it was left out of JSON I think you're forgetting the birthplace of JSON. Who deals with the concept of infinity and
by nomel 5y ago
> To the point that I don't understand why it was left out of JSON
I think you're forgetting the birthplace of JSON. Who deals with the concept of infinity and NaN in the context of web front ends?
- lifthrasiir 5y agoRanges are pretty common in APIs and both -Infinity and Infinity can naturally arise from one-sided ranges. Since they are absent in JSON, they are frequently replaced with null, ad-hoc sentinel values with uncoded assumptions (e.g. timestamps should be always positive) and missing fields.
- stinos 5y agoI get that, but to go from "oh this won't be very common" to willingly "let's just leave this out" is something else. At least in my mind :) Or was it an oversight?
- mst 5y agoI suspect it was a bet on worse is better. Whether it was a good bet is debatable, but given Crockford's focus on "try and leave out as much as possible" I can certainly see it making sense at the time.