On Tuesday, November 29, 2011 20:42:59 Marco Leise wrote: > Am 29.11.2011, 20:41 Uhr, schrieb Marco Leise <marco.le...@gmx.de>: > > Am 29.11.2011, 14:53 Uhr, schrieb bearophile <bearophileh...@lycos.com>: > >> deadalnix: > >>> No it has nothing to do with this bug. > >> > >> I tend to agree. > >> > >>> But actually, this exemple should > >>> generate a warning at least, or being illegal eventually. > >> > >> I'd like that code to loop on all array 256 items once, and then stop > >> > >> :-) > >> > >> Bye, > >> bearophile > > > > Is it evil if I propose that 'i' should always be size_t and nothing > > else? > > Yes, because you can iterate over -10..10 as well -.-
I would argue that i should always be size_t if it's an index. So, foreach(i; -10 .. 10) {} would be valid, but int[] arr; foreach(byte i, val; arr) {} wouldn't be. - Jonathn M Davis