Top 5

Benji Smith dlanguage at benjismith.net
Sat Oct 11 13:24:11 PDT 2008


Andrei Alexandrescu wrote:
> bearophile wrote:
>> Benji Smith:
>>> Java's design decision to always use two-byte characters is a
>>> superior choice,<
>>
>> It's a design error caused by the early adoption of unicode by Java,
>> because unicode needs 4 bytes. So it may lead to problems.
> 
> I agree. I find it odd that anyone finds Java's character choice 
> superior now, when it's acknowledged it missed the mark somewhat 
> dramatically (only a short time shy of UTF-32 adoption).
> 
> Andrei

I think you make a good point. It never occurred to me before, though, 
because I've never actually run across it in the last eight years of 
Java coding.

But if you think java's implementation is a design mistake, because of 
sloppy integration across two-byte/four-byte lines, isn't D's string 
design guilty of the same mistake, but also across the one-byte/two-byte 
line?

--benji



More information about the Digitalmars-d mailing list