Ruslan Nikolaev wrote:

> 1. When we have 2 methods (one with wchar[] and another with char[]), how D will determine which one to use if I pass a string "hello world"?

I asked the same question on the D.learn group recently. Literals like that don't have a particular encoding. The programmer must specify explicitly to resolve ambiguities: "hello world"c or "hello world"w.

> 3. Even if they do support, it is kind of annoying to provide methods for all 3 types of chars. Especially, if we want to use native mode

I think the solution is to take advantage of templates and use template constraints if the template parameter is too flexible.

Another approach might be to use dchar within the application and use other encodings on the intefraces.

Ali

Reply via email to