Errors in TDPL

Jonathan M Davis jmdavisProg at gmail.com
Mon Jun 21 12:09:22 PDT 2010


Okay. I am in no way trying to say anything negative about TDPL. In fact, 
from what I've read so far, it's absolutely fantastic and quite possibly the 
most entertaining programming book that I've read in addition to being quite 
informative about D. However, no one's perfect (Andrei included), and there 
are bound to be errors in the book which didn't get caught.

My thought was that we could point out any errors that we've found so that 
Andrei can get them fixed in future printings and/or we can find out that 
they aren't actually errors.

The only errors that I've found so far have been omissions in the list of 
keywords on page 31. I'm listing them according to my understanding of 
whether they're still keywords, since I think that some have been removed as 
keywords or at least are no longer supposed to be keywords.

Definitely should be there
--------------------------
immutable
lazy
pure
nothrow
shared

I _think_ that it's supposed to be there
----------------------------------------
cent
ucent

I think that they might not supposed to be keywords anymore
-----------------------------------------------------------
cdouble
cfloat
creal
delete
idouble
ifloat
ireal
foreach_reverse

Everything under "definitely" appears to be used in TDPL as keywords but not 
listed as them. cent and ucent aren't listed, but as far as I know are still 
keywords (albeit not implemented yet). The ones that are missing which I 
think have been removed are still listed in the online docs' list of 
keywards but not in the book. IIRC, the c/i floating points got moved to 
phobos; according to TDPL, delete was deprecated (though I hadn't picked up 
on that); and I believe that foreach_reverse has been deprecated in favor of 
using the combination of foreach and retro. So, TDPL is missing at least 
some keywords in its list, and the online docs have too many.

In any case, I figured that it would be helpful if any errors in TDPL could 
be pointed out, since it could be helpful to Andrei and could be helpful to 
those reading it if the error isn't obvious. However, I certainly do _not_ 
want to in any way indicate displeasure with the book. It's quite good. It's 
just that it does appear to have some errors in it that snuck through.

- Jonathan M Davis


More information about the Digitalmars-d mailing list