In D, long and ulong are always 8 bytes. This lines up with most 64-bit systems under the version(Posix) umbrella, where long and unsigned long are also 8 bytes. However, they are 4 bytes on 32-bit architectures. Moreover, they’re always 4 bytes on Windows, even on a 64-bit architecture.

Why is this? How are we expected to write cross platform code with long/ulong? What are the alternatives?

Reply via email to