Text in D article
Daniel Keep
daniel.keep.lists at gmail.com
Sat Nov 18 06:42:01 PST 2006
Anders F Björklund wrote:
> Daniel Keep wrote:
>
>> Here's a draft of an article which, hopefully, will explain some of the
>> details of how text in D works. Any constructive criticism is welcomed,
>> along with edits or corrections.
>
> I would avoid the term "Unicode character" like the plague...
> If you must have something similar, then use "code point" ?
> It's OK to have it in the casual text, like "ASCII character,
> BMP character, Unicode character" but better not in the lists.
Mmm. I was trying to use the correct terms where appropriate, I just
didn't want it to descend into unintelligible gibberish. This is sort
of aimed at the person who has no idea what a 'code point' or 'code
unit' even is.
> It also has an example on why: printf("Hello, World!\n");
> doesn't work. But it does, since string *literals* are all
> NUL-terminated. However, when you then try to extend that
> to a string variable, and that variable contains a slice...
>
> --anders
Very true. I suppose I *should* say that literals are NUL-terminated,
but I want to make it perfectly clear that relying on this is a bad
idea; is it accepted practice to simply treat all strings as if they
were possibly non NUL-terminated?
-- Daniel
--
Unlike Knuth, I have neither proven or tried the above; it may not even
make sense.
v2sw5+8Yhw5ln4+5pr6OFPma8u6+7Lw4Tm6+7l6+7D
i28a2Xs3MSr2e4/6+7t4TNSMb6HTOp5en5g6RAHCP http://hackerkey.com/
More information about the Digitalmars-d
mailing list