Text in D article

Daniel Keep daniel.keep.lists at gmail.com
Sat Nov 18 07:32:29 PST 2006


Alexander Panek wrote:
> PDF would be great, too.
>
> Tydr Schnubbis 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.
>>>
>> Any chance of an .rtf, .doc, or even .txt? :)

I used the .odt since I wanted people to be able to make modifications
to it directly, if they wanted.

I really don't like .rtf or .doc (long, painful history with those two),
and .txt would probably destroy all formatting.  I usually write stuff
in reStructuredText, but just didn't on this occasion.

Finally, the OOo-produced .pdf is kinda big (by an order of magnitude).

So here is an .xhtml version, and I will continue to supply this with
any updates.  If someone needs it in something else, I'll do that as
necessary.  No point in continually converting it when I'm still
updating it :P

> If you change the license you can put it in the Wiki4D ?

I've duel-licensed it under CC At-Sa and FDL but WOW the FDL is bad.
Reading it is like trying to swim through tar.  Also, I'm not entirely
sure, but I think I may be violating the license by distributing it as
ODT... I'm... not entirely sure.

I've also got some moral objections to a few parts of the license, but I
suppose it's not enough to prevent me using it.  Problem is that GNU
state specifically that the CC At-Sa license is not compatible with the
FDL.  Bloody hippies :3

> 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.

I've changed references to "characters" to "code points", but it now
seems very cumbersome.  I read the Wikipedia article, but I'm still not
100% sure where the distinction lies.

So: what *precisely* is a "character", and when it is appropriate to use
the word?

> 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...

I've changed it to say that "statements like the above", and put in a
note that yeah, ok, the example actually *does* work, but you really
shouldn't count on that.

Apart from the "character" -> "code point" changes, I've tried to mark
all changes by hi lighting them yellow.

	-- 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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Text in D.zip
Type: application/octet-stream
Size: 27042 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20061119/fe928798/attachment.obj>


More information about the Digitalmars-d mailing list