> You can't take the address of the return value of a function or a > conversion (which is conceptually just a function) because it doesn't > have a location in memory and thus doesn't have an address.
I've never understood the reason for this limitation. I'd expect the compiler to box any value that I take the address of, i.e. automatically convert p := &f() into x := f() p := &x Another way to put it is that I don't understand the disymmetry between p := &Foo{} which works, and p := &5 which doesn't. -- Juliusz -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.