On Sun, Dec 20, 2020 at 8:38 PM K. Alex Mills <k.alex.mi...@gmail.com> wrote:

> During a Q&A session at this year's GopherCon, some members of the Go 
> language team indicated a willingness to modify the behavior of range loops 
> if we can be reasonably certain that the change will not cause incorrect 
> behavior in current programs.

I expressed my concerns at the issue tracker in 2017 when I still had
a Github account. That's no more the case, so I'll take the
opportunity to make a comment here. I still believe that the intent to
change the behavior the way issue #20733 proposes is [plain] wrong. It
can turn loops in existing code that do not allocate to loops that
allocate. That can be avoided by certain compiler optimizations that
may be already present in [some or all] known Go compilers. But such
particular optimization is not part of the language specification so
the runtime performance of some code may differ dramatically between
[future] compilers.

Go is not, and I hope should not become, a language defined by [any
particular] implementation.

-- 
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-V3HRfbqWVwBZ%2BFGEZnMaMyaFLR9sX4yZmZX1h1ccqV-g%40mail.gmail.com.

Reply via email to