[Nickle]Array comprehension changes

Bart Massey nickle@nickle.org
Fri, 09 Aug 2002 17:07:13 -0700


Like the comprehension syntax.  Cool!

I must have been drunk when I suggested being able to name
the array inside the comprehension: its a very "special"
case, and the syntax is no good.  Rip it back out, IMHO.

	Bart

In message <E17dI0y-0000jY-00@localhost> you wrote:
> 
> Carl came up with the improved syntax which now works:
> 
> 	a)	int[10] i = { [j] = j + 1 };
> 	b)	int[10] i = { [j] { 
> 				int c = 0;
> 				for (int k = 0; k <= j; k++) 
> 					c += k;
> 				return c;
> 			} };
> 
> Bart asked for a way to name the array inside the comprehension, so I came 
> up with '[]':
> 
> 		int[10] i = { [j] = dim([]) - j };
> 
> -keith
> 
> 
> 
> _______________________________________________
> Nickle mailing list
> Nickle@nickle.org
> http://nickle.org/mailman/listinfo/nickle