Major performance problem with std.array.front()

Walter Bright newshound2 at digitalmars.com
Thu Mar 6 19:55:53 PST 2014


On 3/6/2014 7:22 PM, bearophile wrote:
> One advantage of your change is that this code will work:
>
> auto s = "hello".dup;
> s.sort();

Yes, I hadn't thought of that.

The auto-decoding front() introduces all kinds of asymmetry in how ranges work, 
and asymmetry is bad as it negatively impacts composability.



More information about the Digitalmars-d mailing list