why does isForwardRange work like this?

Jonathan M Davis via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 1 13:03:09 PDT 2014


On Friday, 1 August 2014 at 19:59:16 UTC, Jonathan M Davis wrote:
> But since dup and idup aren't being implemented by lots of 
> different people like the range API is, changing those doesn't 
> risk breaking code where folks made it a variable.

Well, I probably shouldn't put it quite that way, since that's 
not the only problem with changing save (which I guess that that 
statement implies). The real problem with changing save is that 
we'd have to change the template constraint to use save() to make 
sure that no one declared it as a variable, and that would break 
everyone's code who declared save as a property - so, everyone. 
And _that_ is why save isn't going to change.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list