complement to $

bearophile bearophileHUGS at
Fri May 14 13:53:36 PDT 2010

Ali Çehreli:
> $ has always bugged me anyway, so how about no character at all:

The $ is not elegant, but it's a good solution to a design problem, how to represent items from the bottom of the array. In Python you write:
In D you write:

This small one-char difference has an important effect for a system language: the presence of $ allows you to avoid a conditional each time you want to access an array item :-)
So I think it as one of the smartest details of D design :-)


More information about the Digitalmars-d mailing list