Re:Padding is hard
by masklinn on Friday October 09, 2015 @12:36PM
(#10361268)
Except technically struct memory layout is currently undefined in Go so you're relying on an implementation detail.
[ Parent
| on HN ]
This kind of optimized placement could in principle be done by a sufficiently smart compiler, but no such compiler exists. That's why existing compilers allow their users to control layout by, as you say, relying on an implementation detail.