4 ms·
What guarantees does Go provide about pointer aliasing? I have no production code in Go, but from what I have played with, Go has no way of indicating that a po
by sinistersnare 11y ago
What guarantees does Go provide about pointer aliasing? I have no production code in Go, but from what I have played with, Go has no way of indicating that a pointer is not aliased, so how can it optimize that, other than through static analysis, which will not catch the majority of cases.
I ctrl-f'd "alias" on your paper that you linked, and no mention is shown.
edit: in fact, I forgot to look for "escape analysis." So it does get mentioned, but only to point out that it is a non-goal of the project.
- andrewchambers 11y agoGo just guarantees different typed pointers don't alias, I think C has a flag to allow this assumption though.