Hacker News new | ask | show | jobs
by snek 2226 days ago
As is mentioned in the article, u64 was used to future proof for wasm's upcoming memory64 type: https://github.com/WebAssembly/memory64/blob/master/proposal...
1 comments

Yeah, so what are they going to do when they then claim to need to to represent the length 2^64?
That won't happen on a 64 bit machine. By the time we need that, the code will be so vastly different that trying to prepare for it now would be counterproductive.
I agree it's stupid. I think worrying about representing the length of 1 object filling the entire address space is stupid, wether the address space is 2^32 or 2^64
> representing the length of 1 object filling the entire address space

Isn't this about encoding the WASM address space itself, inside the outer computer's 64 bit address space?

It's only a slight annoyance if it doesn't get to be quite the normal limit, but since they're changing some of this code anyway, and they're going to need even bigger numbers in the future, it makes sense to do a proper adaptation.

If you have 2^64 objects, you have a bigger problem.
If 32 bit is from your face to your hand, 64 bit is from you to the sun. You aren't going to need that on a single computer in your lifetime.