protocol for using InputRanges

Walter Bright newshound2 at digitalmars.com
Thu Mar 27 17:41:48 PDT 2014


On 3/27/2014 3:23 PM, QAston wrote:
> The protocol is not intuitive.

I find empty-front-popFront as perfectly intuitive. I don't find the counter 
proposals, which come with baggage like constructors that may fail, and front() 
that may fail in unspecified ways, or throwing entire paradigms out the window, 
as intuitive.

But I concede that other people think differently. Not everyone thinks the same. 
But consider this: floating point math is not intuitive. There has never been a 
shortage of proposals to make fp intuitive, but they've all failed because they 
are impractical.

Sometimes ya gotta go with what works.


More information about the Digitalmars-d mailing list