Is there any way I can make the Go compiler use int64 by default on my system? I am writing code for project Euler on my 64 bit machine. There is little chance the code would be shared so there is no worry about running it on a 32 bit machine.
The int
type in go will be 64bits on 64bit machines in the next release, version 1.1. If you download the latest development code you can use it now.
There is no way to force int
to be a certain size. However, when you use int
you should never assume a particular size. Instead, explicitly type your numbers as int64.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With