Why foreach(c; someString) must yield dchar

Kagamin spam at here.lot
Wed Aug 18 23:03:17 PDT 2010


dsimcha Wrote:

> If D is at all serious about generic programming, we simply can't require this
> to be dealt with **everywhere** as a special case.

Just remove the special case of automatic conversion from strings to dchar[] and you will have one less surprize. After all, it was a deliberate design decision to make strings arrays.
Make dchar ranges explicitly, you can't code without writing what you want, right? Or write a special case library for strings, that will do the job for you.


More information about the Digitalmars-d mailing list