input validation

Sean Kelly sean at invisibleduck.org
Wed Mar 4 16:38:35 PST 2009


Andrei Alexandrescu wrote:
> 
> Returning int from find is an insult. To add injury to it, have find 
> also return an int for a list.

tango.core.Array deals exclusively with indexes, but its aim is to make 
D's built-in arrays look more like a robust type than to provide a 
general set of algorithms usable with containers, etc.  So in that 
instance, I think the decision is justifiable.  It certainly makes for 
some nifty code when combined with the slice syntax.



More information about the Digitalmars-d mailing list