In the meantime, let's use this thread to discuss people's plans for Go 1.14.
package pvar g *int//go:noinlinefunc f(p ***int) { g = **p }func e() {var i intj := &i // BAD: 'j' is currently heap allocated, but needn't bek := &jf(&k)}
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-dev/CAKWVi_SEV639xER5qHzEagBUTNX1Sp9b%3D6rOQsoFfmxmUbrpHg%40mail.gmail.com.
To remove an init function, you need to prove in the compiler that it doesn't have any side effect besides initializing the global variable, which in turns means agreeing on a definition of "side effects" (for instance, almost everything has a visibile effect under a step-by-step debugger, or when inspected with strace/ptrace). I plan to begin conservatively here: I'd like to land the whole infrastructure with a very pessimistic definition of "having a side effect" (eg: any function call is a side effect) and iterate from there, so that each subsequent CL improving the side effect detection (or rather, "no side effect" detection) can be discussed from a semantic point of view.