
14 Jun
2006
14 Jun
'06
11:22 a.m.
I would like to suggest that for-from loops be sugar for for-in loops. I would like to suggest the possibility to use ranges with for-in loops, which might already be the case. Finally, I suggest supporting Cartesian products of ranges. Finally, I suggest that for x from 0 to X - 1 do for y from 0 to Y - 1 do could be written as for (x, y) in (0 .. X - 1, 0 .. Y - 1) or something like that. Maybe for x, y in 0 .. X - 1 x 0 .. Y - 1 where x is the Cartesian product? Nah. Make them tuples? I.e., use [] again? for x, y in [0 .. X - 1][0 .. Y - 1] I like this, since it basically means that arrays are nothing both variables indexed over ranges that can now be multidimensional.