On Wed, Jun 2, 2021 at 8:48 AM cheng dong <qq451954...@gmail.com> wrote:
> `y` escape because the println use interface{} as its parameter, println is a bootstrap function that the compiler knows about by itself. It's formal/pseudo signature does not use 'interface{}'. I haven't checked the actual implementation, but I guess, especially in the early days of the compiler, implementing println without using `interface{}' would be simpler and make more sense. I would just special case at compile time the few supported types to produce calls of different runtime implementations. In any case, using println when studying the escape analyzer is an unfortunate choice because println is kind of a special black box that can differ substantially between compilers and/or versions. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAA40n-X-JqT%3DaQ_FnfO3tGBqtAjGA%2BBf76q7Ni_6NrzJbC84aQ%40mail.gmail.com.