On Saturday, 1 June 2013 at 04:16:44 UTC, Jonathan M Davis wrote:
[snip]
The situation is even
worse with narrow strings (assuming that put works with them - I'm not sure that it does at the moment) given that even if you knew their length (which you wouldn't if you were going by hasLength), you wouldn't know whether a put would succeed when the string was nearly empty, as the actual number of
elements that the dchar would take up would depend on its value.


Furthermore--you probably know this because of the conversation on GitHub but for anyone else reading--narrow strings are also hard to work with because you can't put a dchar on them currently. Kenji had a pull request (since closed) to help with narrow strings issues:

https://github.com/D-Programming-Language/phobos/pull/1000

That and all the issues and unknowns you describe would need to fixed for output ranges are going to be the approach.

I'm reminded of a forum post by monarch_dodra that talked about some of the issues you brought up: http://forum.dlang.org/thread/[email protected]

Reply via email to