foreach with a default range

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 11 14:06:24 PDT 2015


On Thursday, 11 June 2015 at 20:54:46 UTC, Steven Schveighoffer 
wrote:
> It makes sense, and is very extendable, and uniform. You can 
> deal with this much easier when imlplementing some sort of 
> wrapping than one that has to do something different depending 
> on how many args are passed inside the []. I like the new way.

Well, considering that we're talking about a _slicing_ operation, 
and not an indexing operation, I'm not about to start using 
opIndex for it unless I'm forced to.

- Jonathan M Davis


More information about the Digitalmars-d mailing list