Re: [go-nuts] Re: Are the two unsafe uses safe?

2021-02-28 Thread 'Axel Wagner' via golang-nuts
On Sun, Feb 28, 2021 at 9:09 AM tapi...@gmail.com wrote: > Is this error essential? > Yes. You need to be able to do arithmetic on addresses to use an array, but for that they need to have a known type and size. By exceeding the address space, you are creating a type that the compiler can't

[go-nuts] Re: Are the two unsafe uses safe?

2021-02-28 Thread tapi...@gmail.com
Sorry, the first one will get a "type [9223372036854775807]byte larger than address space" error. The following code will get the same error var x *[^uint(0) >> 1]byte Is this error essential? On Saturday, February 27, 2021 at 11:00:26 PM UTC-5 tapi...@gmail.com wrote: > 1. > > func