There's no workaround. It's something we know we'll have to
address eventually, but for now that's the limit. Note that the
limit is on the number of array elements, not the total memory
usage or even the size of the allocated block, so you should
be able to allocate, say, four separate 1.5 GB byte slices or
one 1.5 billion element slice of uint32s just fine.
Russ
Isn't 1.5 billion float32s already 6 GB?
Russ
Another thing: there's a lot of virtue in strings.Index (and the like)
returning a single value. In the many cases when you know a particular
substring is present, it's nice to be able to write something like:
b := a[:strings.Index(a, "foo")] // cut a at "foo"
The plan is to change the size of int on amd64 systems from 32 bits to
64 bits, as per the Go spec.
I just ran into the int32 issue myself, so I am very interested in a time frame for this change.Or is there some nightly to play around with already?Thanks!Hagen
On Oct 21, 2012 9:37 AM, "Niklas Schnelle" <niklas....@gmail.com> wrote:
> By Go 1 is locked down, do you mean Go 1.0 or Go 1.x? As I understand it the Go language specification explicitly says that int is at least 32 bit so in theory making it int64 on x86_64 isn't an issue?!
> Nice to see that there is already a patch, I always saw this one of the biggest mistakes of Java that they have so many things in their language that are absolutely unchangeable and yet totally wrong. Though it's much easier for Go because there is no strictly defined byte code and we already got uintXXs, structs and a sane type system in general.
on the default branch, int and uint are already 64-bit
on amd64.