Steven Schveighoffer wrote:
On Tue, 20 Jul 2010 14:29:43 -0400, Walter Bright
<newshou...@digitalmars.com> wrote:
It's a D1 feature, and has been there since nearly the beginning.
Since when did we care about D1 compatibility?
We care about incompatibilities that silently break code.
const, inout, array appending, final, typeof(string), TLS globals just
to name a few...
If you expect D1 code to compile fine and run on D2, you are deluding
yourself.
No argument there, but we do try to avoid silent breakage.
The worst that happens is that code starts using dchar instead of char,
and either a compiler error occurs and it's fixed simply by doing:
foreach(char c; str)
or it compiles fine because the type is never explicitly stated, and
what's the big deal there? The code just becomes more utf compatible
for free :)
I don't think it's necessarily true that the user really wanted the decoded
character rather than the byte, or even that wanting the decoded character is
more likely to be desired.