Re: [go-nuts] why iota can't be assigned to variables?

2017-05-04 Thread roger peppe
On 4 May 2017 at 03:52, T L 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 wrote: >>> >>> >>> >>> On Thursday, May 4, 2017 at 12:46:47 AM UTC+8, Axel Wagner wrote: but

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
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 > wrote: > >> >> >> On Thursday, May 4, 2017 at 12:46:47 AM UTC+8, Axel Wagner wrote: >>> >>> but >>> const ( >>> a = iota >>> b >>> s string >>> d >>> )

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread 'Axel Wagner' via golang-nuts
On Wed, May 3, 2017 at 7:04 PM, T L 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 >>

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
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

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread 'Axel Wagner' via golang-nuts
but const ( a = iota b s string d ) is not a valid declaration. You can't say "the rule is the same for constants". Again: const-declarations and variable declarations are very different. You can not argue "it's the same"; it's not. On Wed, May 3, 2017 at 6:28 PM, T L

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
On Thursday, May 4, 2017 at 12:17:13 AM UTC+8, Jan Mercl wrote: > > On Wed, May 3, 2017 at 6:00 PM T L > wrote: > > > Just like what expected for constants. > > For constants it's expected to reuse the last iota expression when absent. > Do you propose that > > var

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread Jan Mercl
On Wed, May 3, 2017 at 6:00 PM T L wrote: > Just like what expected for constants. For constants it's expected to reuse the last iota expression when absent. Do you propose that var ( a = iota b ) will become valid and

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
On Wednesday, May 3, 2017 at 11:39:29 PM UTC+8, Jan Mercl wrote: > > On Wed, May 3, 2017 at 5:07 PM T L > wrote: > > > The complexity is the same as iota in constant declarations. > > How can that be claimed when still nobody ever seen any specification of > what var foo

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread Jan Mercl
On Wed, May 3, 2017 at 5:07 PM T L wrote: > The complexity is the same as iota in constant declarations. How can that be claimed when still nobody ever seen any specification of what var foo = iota shall do at all? The space of possible semantics is unbounded. The sane

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread Ayan George
On 05/03/2017 10:38 AM, T L wrote: > > > On Wednesday, May 3, 2017 at 9:28:28 PM UTC+8, Jan Mercl wrote: > > On Wed, May 3, 2017 at 3:19 PM T L > wrote: > > Why would you want to assign iota to a variable? What value should > iota in such case have? > > > The request

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
On Wednesday, May 3, 2017 at 10:53:42 PM UTC+8, Jan Mercl wrote: > > On Wed, May 3, 2017 at 4:38 PM T L > wrote: > > > The request is not essential, but any harm of it? > > How can anybody know that if nobody knows what it shall actually do and > what will be the impact on

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread Jan Mercl
On Wed, May 3, 2017 at 4:38 PM T L wrote: > The request is not essential, but any harm of it? How can anybody know that if nobody knows what it shall actually do and what will be the impact on the complexity of the specification and implementation? -- -j -- You

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
On Wednesday, May 3, 2017 at 9:28:28 PM UTC+8, Jan Mercl wrote: > > On Wed, May 3, 2017 at 3:19 PM T L > wrote: > > Why would you want to assign iota to a variable? What value should iota in > such case have? > > The request is not essential, but any harm of it? > > --

Re: [go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread Jan Mercl
On Wed, May 3, 2017 at 3:19 PM T L wrote: Why would you want to assign iota to a variable? What value should iota in such case have? -- -j -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group

[go-nuts] why iota can't be assigned to variables?

2017-05-03 Thread T L
. -- 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.