On Fri, Aug 11, 2017 at 11:03 AM, Penguin Enormous <[email protected]> wrote: > > I think that there is inconsistency in the way Go compiler report error > regarding name/unnamed parameters. This is a bit hard for me to explain in > words so please check out this short snippet first: > > https://play.golang.org/p/Sg0DtCtgF2 > > Is this unexpected behavior or it's just me that's feeling strange?
Go does not permit mixing named and unnamed parameters in a parameter list. In a declaration like Run(int, f float64) you have two parameters of type `float64`. The first parameter is named `int` and the second parameter is named `f`. (The essential point here, of course, is that in Go `int` is not a keyword, and it's OK, though weird, to have a parameter or variable named `int`). 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
