...as always, a pragmatic and informed response. Thanks. On Mon, May 22, 2017 at 5:59 PM, Ian Lance Taylor <i...@golang.org> wrote:
> On Mon, May 22, 2017 at 5:49 PM, Michael Jones <michael.jo...@gmail.com> > wrote: > > > > On Mon, May 22, 2017 at 5:19 PM, Ian Lance Taylor <i...@golang.org> > wrote: > >> > >> Rejecting an unsigned comparison with zero would be a > >> language change. > > > > > > yes, but it is not just a comparison with zero, it is a "is it less than > > zero, which it cannot possibly be since it is unsigned" so therefore it > > would be enforcing a rule than no correct program can violate. This is > the > > kind of scenario under which other tweaks have gone in... > > True, but I think some of those tweaks have proven to be problematic. > I'm thinking in particular of the ones that changed constant division > by zero to be a compile time error. Basically, it's only a problem if > the code is executed. Changing this code to be a compile-time error > means that, for example, code generators need workarounds just to > avoid compile-time errors for code that doesn't matter. > > Ian > -- Michael T. Jones michael.jo...@gmail.com -- 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.