On Tue, Aug 14, 2018 at 3:49 PM, Dan Kortschak
<dan.kortsc...@adelaide.edu.au> wrote:
>
> This ignores the possibility that more than one alignment-sensitive
> field might be needed. Requiring that they all be up front, potentially
> degrading readability flies in the face of the design principles of the
> language. This kind foot-gun in other languages is why many people
> choose Go.

Yes.  It's a bug.  It's listed as a bug at the bottom of
https://golang.org/pkg/sync/atomic.  The problem is that we haven't
figured out the right way to fix it.  It may require a language
change.  Or see https://golang.org/issue/19057 .

Ian


> On Tue, 2018-08-14 at 06:49 +0000, Jakob Borg wrote:
>> It’s a bug in the library if it uses 64 bit atomic operations without
>> ensuring 64 bit alignment. Putting the alignment-required field at
>> the top of the struct is the traditional method.
>>
>> //jb
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to