protocol for using InputRanges

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Thu Mar 27 05:45:18 PDT 2014


On Thursday, 27 March 2014 at 12:35:04 UTC, Steven Schveighoffer 
wrote:
> What happens when one of our "clients" code breaks severely 
> because we make a change in phobos that assumes empty is always 
> called first on a newly-created range?

You probably can run-time test this in Debug builds, but…

> I think we should work on making a protocol that does not 
> require awkward calls, rather than alienating developers who 
> don't follow the awkward protocol.

This is it. There is way too much awkwardness in D already. And 
essentially, the closer the design is to mainstream the more 
annoying it is when you diverge and are inconsistent.

Code should behave as expected without any need for memorizing. 
Having to differentiate between dialects is so much harder than 
differentiating between orthogonal languages.


More information about the Digitalmars-d mailing list