Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Go itself says you "cannot take the address" of some values. For example:

  m := map[int]int{1: 2}
  p := &m[1]
The second line causes the compilation error "cannot take the address of m[1]".

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



Thanks, I think it was the wording "addressable" that was the source of my confusion. "cannot take the address of" seems more intuitive to me. Cheers.




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

Search: