On Friday, 7 March 2014 at 03:52:42 UTC, Walter Bright wrote:
Ok, I have a plan. Each step will be separated by at least one
version:
1. implement decode() as an algorithm for string types, so one
can write:
string s;
s.decode.algorithm...
suggest that people start doing that instead of:
s.algorithm...
I think .decode should be something more explicit (byCodePoint
OSLT), just so it's clear that it's not magical and does not
solve all problems.
2. Emit warning when people use std.array.front(s) with strings.
3. Deprecate std.array.front for strings.
4. Error for std.array.front for strings.
5. Implement new std.array.front for strings that doesn't
decode.
Until then, how will people use strings with algorithms when they
mean to use them per-byte? A .raw property which casts to ubyte[]?