What\'s the cleanest way to handle a case such as this:
func a() string {
/* doesn\'t matter */
}
b *string = &a()
This generates the
In the end you are proposing that Go should allow you to take the address of any expression, for example:
i,j := 1,2
var p *int = &(i+j)
println(*p)
The current Go compiler prints the error: cannot take the address of i + j
In my opinion, allowing the programmer to take the address of any expression:
It seems counterproductive to complicate the compiler and the spec for little gain.