DMD 0.177 release [Length in slice expressions]

Don Clugston dac at nospam.com.au
Thu Dec 21 10:01:55 PST 2006


Andrei Alexandrescu (See Website For Email) wrote:
> Another way out of it is to ban "length" but stick with "$". But "$" has 
> another bunch of problems. It's a special character used only once, and 
> only in a very particular situation. There is no general concept 
> standing behind its usage: it sticks out like a sore thumb. "$" isn't 
> the last index in an array. It's that only when used inside a slice, and 
> refers only to the innermost index of the array. Quite a waste of a 
> special character out there, and to little usefulness.
> 
> But if we made "$" into an operator identifying the last element of 
> _any_ array, which could refer to the last element of _the left-hand 
> side_ array if we so want, then all of a sudden it becomes useful in a 
> myriad of situations:

Provided that some such expansion path for "$" exists, it would seem to 
be adequate for D 1.0 to just remove "length". And this could be done by 
Jan 1.



More information about the Digitalmars-d-announce mailing list