Currently, the docs for Prim say that Int is a 32-bit signed integer. However, in #1094, we seemed to be moving towards a consensus that the number of bits in an Int should be allowed to vary between platforms and backends.
Since there's a bit of confusion regarding this type (e.g. "Why doesn't it go up to Number.MAX_SAFE_INTEGER") I'd like to clarify this. I think the options are:
- Decide that Int really is exactly 32 bits
- Define Int as a twos-complement signed integer with at least 32 bits
- something slightly different from either of these? I'm not sure.
Whatever we decide we should update the Prim docs appropriately.
Currently, the docs for Prim say that Int is a 32-bit signed integer. However, in #1094, we seemed to be moving towards a consensus that the number of bits in an Int should be allowed to vary between platforms and backends.
Since there's a bit of confusion regarding this type (e.g. "Why doesn't it go up to
Number.MAX_SAFE_INTEGER") I'd like to clarify this. I think the options are:Whatever we decide we should update the Prim docs appropriately.