Hacker Newsnew | past | comments | ask | show | jobs | submit | iovec's commentslogin

Since it doesn't seem like this was answered in the other discussion, the answer is that Go does not allow taking the address of a map value. You get a compile-time error: "cannot take the address of m[x]".

https://play.golang.org/p/rX8A6ez9fVx


Indeed. This is in a thread where the original comment was "I think the best approach would be making & work in basically any scenario." I'm trying to demonstrate the complications of making it work on map accesses.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: