VLERange: a range in between BidirectionalRange and RandomAccessRange

Lutger Blijdestijn lutger.blijdestijn at gmail.com
Sat Jan 15 09:11:59 PST 2011


Steven Schveighoffer wrote:

...
>> I think a good standard to evaluate our handling of Unicode is to see
>> how easy it is to do things the right way. In the above, foreach would
>> slice the string grapheme by grapheme, and the == operator would perform
>> a normalized comparison. While it works correctly, it's probably not the
>> most efficient way to do thing however.
> 
> I think this is a good alternative, but I'd rather not impose this on
> people like myself who deal mostly with English.  I think this should be
> possible to do with wrapper types or intermediate ranges which have
> graphemes as elements (per my suggestion above).
> 
> Does this sound reasonable?
> 
> -Steve

If its a matter of choosing which is the 'default' range, I'd think proper 
unicode handling is more reasonable than catering for english / ascii only. 
Especially since this is already the case in phobos string algorithms.


More information about the Digitalmars-d mailing list