reddit.com: first Chapter of TDPL available for free

Steven Schveighoffer schveiguy at yahoo.com
Mon Aug 10 10:15:11 PDT 2009


On Mon, 03 Aug 2009 18:00:59 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> http://www.reddit.com/r/programming/comments/975ng/diving_into_the_d_programming_language_tdpl/
>
> (Don't tell anyone, but I plan to rewrite it.)
>
> Andrei

Wow, my head's spinning :)

That's a lot of data/concepts in one chapter.  Have you considered how  
this chapter will be for a newbie programmer?  Not a programmer that comes  
 from C or Java or Python or whatever, but someone who's starting with a  
blank slate?  I noticed you gloss over a lot of details.  For example:

"The operators and their precedence are much like the ones you'd find in  
D's sibling languages: '+', '-', '*', '/', and '%' for basic arithmetic,  
'==', '!=', '<', '>', '<=', '>=' for comparisons, fun(argument1,  
argument2) for function calls, and so on."

A new-to-programming person is going to be baffled by some of that, such  
as % for basic arithmethic, and == and != for comparisons.

I understand this is an overview, but you may want to mention that the  
chapter is assuming you know a programming language already (preferrably a  
C-like one).  Or am I misunderstanding the target audience?  I'd say  
chapter 1 should be simple enough to be understood by everyone, not just  
experienced programmers.  It's a good overview of the language, but reads  
much more like a comparison with C++.  It's more like a review article  
than an introduction to a new language.  I'd call this chapter a preface  
and indicate its target audience, so newbies can skip right to the  
learning part of the book.

I'm viewing this book as an equivalent to "the C programming Language" by  
K&R.  In chapter 1, they gloss over some of the details, but not nearly as  
many as you have, and the advanced concepts are to a minimum.  And there  
is not a significant time spent explaining how it relates to predecessor  
languages.

*disclaimer: I'm not an expert on teaching or writing books.

Just my 2 cents.

-Steve



More information about the Digitalmars-d mailing list