What features of D are you using now which you thought you'd never goint to use?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sun Jun 23 05:10:06 PDT 2013


On 06/23/2013 12:34 PM, monarch_dodra wrote:
> That's a very "I have a range and want to iterate on it" view. Which is fine and
> it works in that case (and I have no problems there).
> 
> But as soon as you need an algorithm that actually *handles* ranges: swaps them,
> merges them, searches in them and splices them, then things get hairy.
> 
> For example, try implementing a sort (either merge or q) with a non-sliceable
> range... very very hard...

I would take that as a fault in the adaptor, surely?  A well designed
implementation of take or takeExactly or until or any of these other range
adaptors ought to preserve as many properties of the input range as possible.


More information about the Digitalmars-d mailing list