OT (Was: Re: is(ElementType!(char[2]) == dchar - why?)

Yatheendra 3df4 at gmail.ru
Fri Jun 14 20:14:01 UTC 2019


Could this be rendered an aside for newbies, by way of 
documentation, specifically the Unicode portion of the Dlang 
tour? Just never bring up auto-decoding at all, point out 
UTF8/16/32 and point out the fast correct primitive (byCodeUnit) 
that lets you iterate over a string's contents simplistically as 
in other languages. Leave the "proper" handling of Unicode to 
content outside of the tour.

I know very little about Unicode/UTF. If I had only read about 
byCodeUnit, I wouldn't be bothered at all because I understand 
Hindi (and Mandarin, and Japanese, Russian too?) is very 
different from European languages & needs explicit care for 
proper handling. I would be very glad that D makes the situation 
clear, and provides the zero-barrier API to start newbies off on 
an equal footing with past languages.


More information about the Digitalmars-d-learn mailing list