On Friday, August 5, 2016 at 2:21:53 AM UTC+8, Ian Lance Taylor wrote: > > On Thu, Aug 4, 2016 at 11:19 AM, Manlio Perillo > <manlio....@gmail.com <javascript:>> wrote: > > Il giorno giovedì 4 agosto 2016 17:54:33 UTC+2, Dave Cheney ha scritto: > >> > >> Fwiw, io.EOf can be converted to a constant, all the tests pass. But > that > >> would change the type of an exported symbol, so it's not possible. > > > > > > Even though the type is not exported? > > I can't see where the https://golang.org/doc/go1compat document forbids > this > > case. > > Changing the type of io.EOF so that it is no longer type `error` would > break this package. >
Ok, I got what you mean. But I think changing the type of io.EOF to a constant Error is not very bad idea. After all, what care its type? We just care if a returned error equals to it. BTW, it looks, if interface values can be constant, this problem will be solved without breaking .Go 1 contract > > package p > > import "io" > > var P *error = &io.EOF > > Ian > -- 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.