Major performance problem with std.array.front()

Abdulhaq alynch4047 at gmail.com
Mon Mar 10 14:08:35 PDT 2014


On Monday, 10 March 2014 at 18:54:26 UTC, Marc Schütz wrote:
> On Monday, 10 March 2014 at 13:48:44 UTC, Abdulhaq wrote:
>> My app deals with unicode arabic text that is 'out there', and 
>> the UnicodeTM support for Arabic is not that well thought out, 
>> so the data is often (always) inconsistent in terms of 
>> sequencing diacritics etc. Even the code page can vary. 
>> Therefore my code has to cater to various ways that other 
>> developers have sequenced the code points.
>>
>> So, my needs as a 'user' are:
>> * I want to encode all incoming data immediately into unicode, 
>> usually UTF8, if isn't already.
>> * I want to iterate over code points. I don't care about the 
>> raw data.
>> * When I get the length of my string it should be the number 
>> of code points.
>> * When I index my string it should return the nth code point.
>> * When I manipulate my strings I want to work with code points
>> ... you get the drift.
>
> Are you sure that code points is what you want? AFAIK there are 
> lots of diacritics in Arabic, and I believe they are not 
> precomposed with their carrying letters...

Adding to my other comment I don't expect a string type to 
understand arabic and merge the diacritics for me. In fact there 
are other symbols (code points) that can also be present, for 
instance instructions on how Quranic text is to be read. These 
issues have not been standardised and I would say are not well 
understood generally.


More information about the Digitalmars-d mailing list