Major performance problem with std.array.front()

Marc Schütz" <schuetzm at gmx.net> Marc Schütz" <schuetzm at gmx.net>
Sun Mar 9 10:26:35 PDT 2014


On Sunday, 9 March 2014 at 15:23:57 UTC, Vladimir Panteleev wrote:
> On Sunday, 9 March 2014 at 13:51:12 UTC, Marc Schütz wrote:
>> On Friday, 7 March 2014 at 16:43:30 UTC, Dicebot wrote:
>>> On Friday, 7 March 2014 at 16:18:06 UTC, Vladimir Panteleev
>>>> Can we look at some example situations that this will break?
>>>
>>> Any code that relies on countUntil to count dchar's? Or, to 
>>> generalize, almost any code that uses std.algorithm functions 
>>> with string?
>>
>> This would no longer compile, as dchar[] stops being a range. 
>> countUntil(range.byCodePoint) would have to be used instead.
>
> Why? There's no reason why dchar[] would stop being a range. It 
> will be treated as now, like any other array.

This was under the assumption that Nick's proposal (and my 
"amendment" to extend it to dchar because of graphemes e.a.) 
would be implemented.

But I made the mistake of replying to posts as I read them, just 
to notice a few posts later that someone else already posted 
something to the same effect, or that made my point irrelevant. 
Sorry for the confusion.


More information about the Digitalmars-d mailing list