Hacker News new | ask | show | jobs
by whyever 4215 days ago
If you use an unsigned 32 bit integer instead of a signed one then you run into problems at 4 instead 2 gigabytes.
2 comments

But who would have JSON files bigger than 4GB? ;)
We do have a 18GB xml (daily). I guess it will turn to 10 GB json when we convert it over.

Why is it even a question? Imagine a JSON of all the people on Earth.

The parent is joking. "Why would you ever need X?" is a classic question that bites every software engineer at some point. Somebody always needs X.
4194304 K ought to be enough for anybody.
Not many people. But in another 12 years?
While negative numbers very often provoke exceptions like IndexOutOfBoundException, with unsigned integers error could be uncaught for much longer time. I'm all for signed integers, unless storage requirements so tight that you really need that one bit.