One last thing about dollar notation in array slicing.
Shouldn't the following piece of code generate a compile-time error?
import std.stdio;
int main()
{
int[] outer = [0, 1, 2, 3, 4];
int[] inner = [5, 4, 3, 2, 1];
int[] slice = outer[0..inner[$-1]]; < Error: shadowing declaration
__dollar is deprecated
writefln(slice.length);
return 0;
}