On Thursday, 20 February 2014 at 10:28:43 UTC, Steve Teale wrote:
How difficult would it be to allow the '$' to be used instead of
length in something like:
Thing[] ta;
for (size_t i = 0; i < ta.$; i++)
It can be used in slices, and indexes, so it might well be
unambiguous here.
Early versions of D already had the feature: you could write
arr[0..length], but the feature proved to be ambiguous and was
removed.
$ is meant to be a special indexing syntax (like two dots), it's
not a member, not a length.