Go has the following numeric types:
int
int8
int16
int32
int64
uint
uint8
uint16
uint32
uint64
.
Why doesn't Go have a long
number type?
Go has the following numeric types:
int
int8
int16
int32
int64
uint
uint8
uint16
uint32
uint64
.
Why doesn't Go have a long
number type?
There is no need for long
in c# for example long represent Signed 64-bit integer
Just use int64
int{8,16,32,64} — Signed integers of 8,16,32,64 bit in size (int32, int64, etc)
Another thing mast3rd3mon pointed out : Javascript does not even have number types.
in most languages long provide a Signed 64-bit integer , so go provide you this tool by using int64. The name should not matter to you, only his value type.