Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jwmerrill
· 1y ago · 0 comments
The next pointer doesn’t have to go first in the structure here. It can go anywhere, and you can use @fieldParentPtr to go back from a reference to the embedded node to a reference to the structure.
Comments
[–]
n42
1y ago
I think that's the point the parent was making. I read it as them describing a benefit of Zig's approach.
[–]
ralferoo
1y ago
Yeah, that's what I was trying to say, but obviously not clearly enough.
[–]
jwmerrill
OP
1y ago
My mistake! It seems clear in hindsight…