On Thursday, May 4, 2017 at 4:05:06 PM UTC+8, rog wrote: > > On 4 May 2017 at 03:52, T L <tapi...@gmail.com <javascript:>> wrote: > > > > > > On Thursday, May 4, 2017 at 1:21:52 AM UTC+8, Axel Wagner wrote: > >> > >> On Wed, May 3, 2017 at 7:04 PM, T L <tapi...@gmail.com> wrote: > >>> > >>> > >>> > >>> On Thursday, May 4, 2017 at 12:46:47 AM UTC+8, Axel Wagner wrote: > >>>> > >>>> but > >>>> const ( > >>>> a = iota > >>>> b > >>>> s string > >>>> d > >>>> ) > >>>> is not a valid declaration. You can't say "the rule is the same for > >>>> constants". > >>> > >>> > >>> For the same rule, I mean just copying the corresponding part from > last > >>> line. > >>> Yes, declared constant must be assigned. This is an unrelated rule for > >>> this topic. > >> > >> > >> No, it is not an unrelated rule. Because it means that "just like for > >> consts" isn't an argument. You need, at the very least, answer the > valid > >> question ("what happens with that var-declaration and why?") raised > about > >> your proposal. Or better yet, realize that var and const declarations > behave > >> very differently and thus "consistency" isn't an argument to add > something > >> otherwise useless. > >> > > > > ok, I admit the rule difference between variable and constant > declaration > > does matter: > > > > var ( > > a int = iota > > b // should autocomplete > > c int // but this? "c int" is already legal. > > ) > > I don't think I've ever come across a case where I want to assign > increasing-by-one values to adjacent variables. Have you? >
I never used iota for declaring constants too, :) -- 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.