Walter Bright [off-list ref] writes:
void foo(int array[10])
{
for (int i = 0; i < 10; i++)
{ int value = array[i];
... do something ...
}
}
to:
void foo(int[] array)
{
foreach (value; array)
{
... do something ...
}
}
takes a lot of frankly unnecessary things away, each of which is a
potential source of error when maintaining the code.
The problem is a toy problem: in real applications, you'll need to
access several data structures using the same index, and you'll need
to be able to assign index values to temporary variables and so on.
So being able to hide the type of an index in one very specific
application (looping through a single array completely) at one place
is not going to buy you much.
Anyway, D is pretty much irrelevant as a perspective for git, so you
should take it to a language advocacy group.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum