[RFC] Add an operator for ranges to D. Pros and cons?

Dejan Lekic dejan.lekic at gmail.com
Wed Nov 7 13:48:34 PST 2012


> 
> auto something = outRange(bazRange(barRange(fooRange(inRange, param)), param1,
> param2));

It looks readable in this case, but to have it clean like that your parameters 
should be variables, otherwise imagine what would be if in all that you have 
calls to some functions to obtain argument for some of those ranges: 
...fooRange(someObject.getInRange(), foo!(bla)(param1...)),param1...

If I was the author, all would be fine, but if I give that code to someone, 
he/she will need time to understand what is actually happening...

-- 
Dejan Lekic - http://dejan.lekic.org


More information about the Digitalmars-d mailing list