Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
amelius
on May 16, 2015
|
parent
|
context
|
favorite
| on:
Go: A Surprising Edge Case Concerning Append and S...
Copying a pointer is by definition equal to aliasing.
barsonme
on May 16, 2015
|
next
[–]
A slice is:
type sliceStruct struct { array unsafe.Pointer len int cap int }
I think you both _mean_ the same thing, just the previous poster is focusing on the entire struct itself, and you're focusing on the 'array' member of the struct.
Or I'm just babbling.
amelius
on May 16, 2015
|
parent
|
next
[–]
My point was that hiding a pointer in a struct does not magically make the aliasing go away.
stygiansonic
on May 16, 2015
|
prev
[–]
The slice itself is not being aliased, but yes, of course, the underlying array is.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: