www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - suggestion: D Book Project

reply Agent Orange <no spam.com> writes:
We should write a book about D, or even a D for C++ programmers book. It 
would probably only be a handfull of chapters, and one or a couple 
people could do each chapter. maybe even do it on a wiki or something. I 
dont know how the styles would mesh but I just thought this would be 
pretty cool to have.
Sep 03 2006
next sibling parent reply Derek Parnell <derek psyc.ward> writes:
On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:

 We should write a book about D, or even a D for C++ programmers book. It 
 would probably only be a handfull of chapters, and one or a couple 
 people could do each chapter. maybe even do it on a wiki or something. I 
 dont know how the styles would mesh but I just thought this would be 
 pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming -- Derek Parnell Melbourne, Australia "Down with mediocrity!"
Sep 03 2006
parent reply Gregor Richards <Richards codu.org> writes:
Derek Parnell wrote:
 On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:
 
 We should write a book about D, or even a D for C++ programmers book. It 
 would probably only be a handfull of chapters, and one or a couple 
 people could do each chapter. maybe even do it on a wiki or something. I 
 dont know how the styles would mesh but I just thought this would be 
 pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming
That book is not arranged like a book. Nobody could actually learn D from it, even if it was fleshed out. It needs to be scrapped. I've been considering this, and started to make a very basic TOC. I may continue working on it. Or not :) Coding style to be used throughout (note that this is NOT my style, just one that's fairly easy to grasp and not difficult to read): int function(nospace, before, function, parameters) { // brace goes on its own line if (a) // conditionals have a space before their arguments { // in both functions and conditions } while (a.very.long.line.is.being.forced && to.wrap || or.look.very.ugly + it.will.wrap.at.column - 80) { } } (in this TOC, [something] is used to describe content, not as part of the title) 1. Before We Begin... 1.1. Short Introduction to D 1.2. D Compiler 1.2.1. DMD 1.2.2. GDC 1.3. Editors Supporting D 1.3.x. --- TO BE COMPLETED --- 2. The Basics 2.1. Introduction to Modules 2.2. The main Function, or Start at the Beginning 2.3. Basic Output [using std.cstream.dout] 2.4. Basic Input [using std.cstream.din, basic "Hi, I'm D. What's your name?" prog] 2.5. Types [input of a few different types, up to dynamic arrays] 3. Conditions and Loops 3.1. The if Conditional 3.1.1. More Complicated Input [a program that asks age and makes a "clever" response] 3.2. The while Loop 3.2.x. --- TO BE COMPLETED --- 3.3. The foreach Loop 3.3.x. --- TO BE COMPLETED --- 3.4. The for Loop 3.4.x. Advanced Uses 3.5. The switch Conditional 3.5.x. --- TO BE COMPLETED --- 4. Functions and Simple Arguments 4.1. The Concept of Functions [NOT in the Functional Programming sense] 4.2. Simple Functions 4.3. Recursion 4.4. Passing Basic Types 4.5. Passing Arrays 5. Basic Classes and Object Orientation 5.1. The Concept of Classes 5.2. Simple Classes [an extension to the input programs above that has a "person" class with char[] name, int age, etc] 5.3. Methods 5.4. Data Hiding 6. Advanced Arrays 6.1. Dynamic Arrays, Concatenation and COW 6.2. Static Arrays 6.3. Associative Arrays 7. Modules 7.1. Modules and the Filesystem 7.2. Making your Own Modules 7.3. Importing Modules 7.3.1. Public vs private vs static imports 7.3.2. Namespace and Conflicts 8. Advanced Object Orientation 8.x. Class Inheritance, Interfaces, Operator Overloading, Friendly Classes per-module 8.x. --- TO BE COMPLETED --- x. Exceptions (? top level?) x.x. --- TO BE COMPLETED --- x. Templates and Generic Programming x.x. Basic Templates, Mixins? x.x. --- TO BE COMPLETED --- TO BE CONTINUED In no particular order: Exceptions Mixins Function Pointers and Delegates Lazy Evaluation Enumerations Structs (maybe in chapter 8?) Properties Pragmas Unions Garbage Collection Conditional Compilation (version, debug, etc) Contracts - Gregor Richards
Sep 05 2006
parent reply Derek Parnell <derek psyc.ward> writes:
On Tue, 05 Sep 2006 15:17:05 -0700, Gregor Richards wrote:

 Derek Parnell wrote:
 On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:
 
 We should write a book about D, or even a D for C++ programmers book. It 
 would probably only be a handfull of chapters, and one or a couple 
 people could do each chapter. maybe even do it on a wiki or something. I 
 dont know how the styles would mesh but I just thought this would be 
 pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming
That book is not arranged like a book. Nobody could actually learn D from it, even if it was fleshed out. It needs to be scrapped.
Sorry for my far-too-obtuse reference. ;-) What I was trying to get across was that there already exists a wiki platform for writing online books. As an example, there is the beginnings of a D Reference manual. If one wanted to, one could also use the same platform to write a "How To Program using D" style of book. As a start, why not write your proposed TOC as the opening page in such a new endeavor. I know I would like to contribute to it. -- Derek Parnell Melbourne, Australia "Down with mediocrity!"
Sep 05 2006
parent reply Gregor Richards <Richards codu.org> writes:
Derek Parnell wrote:
 On Tue, 05 Sep 2006 15:17:05 -0700, Gregor Richards wrote:
 
 Derek Parnell wrote:
 On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:

 We should write a book about D, or even a D for C++ programmers book. It 
 would probably only be a handfull of chapters, and one or a couple 
 people could do each chapter. maybe even do it on a wiki or something. I 
 dont know how the styles would mesh but I just thought this would be 
 pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming
That book is not arranged like a book. Nobody could actually learn D from it, even if it was fleshed out. It needs to be scrapped.
Sorry for my far-too-obtuse reference. ;-) What I was trying to get across was that there already exists a wiki platform for writing online books. As an example, there is the beginnings of a D Reference manual. If one wanted to, one could also use the same platform to write a "How To Program using D" style of book. As a start, why not write your proposed TOC as the opening page in such a new endeavor. I know I would like to contribute to it.
The main problem I have with wikibook is that, without somebody as the official, ordained editor, often people feel that they shouldn't make large rearrangements, when often it's the best solution. So, it can become fairly stagnant after the original editor either becomes disinterested or simply "finishes" it in his mind. - Gregor Richards PS: I'll start one this evening.
Sep 05 2006
parent reply Lutger <lutger.blijdestijn gmail.com> writes:
Great, what target audience do you have in mind? From the looks of the 
TOC it seems beginner. Maybe that is a suggestion, to keep in mind? Then 
  perhaps the book should also adress or refer to programming and 
computer topics more general. Another option is to split it in parts or 
some other way of organization according to background of readers.

Lack of books and tutorials is one of the arguments people have to not 
try D. It's partly true I guess, especially for beginners / novices. 
Even with one reasonable good wikibook I think D will beat C++ as a 
first language - and a lot of people start with C++.

Gregor Richards wrote:
 Derek Parnell wrote:
 On Tue, 05 Sep 2006 15:17:05 -0700, Gregor Richards wrote:

 Derek Parnell wrote:
 On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:

 We should write a book about D, or even a D for C++ programmers 
 book. It would probably only be a handfull of chapters, and one or 
 a couple people could do each chapter. maybe even do it on a wiki 
 or something. I dont know how the styles would mesh but I just 
 thought this would be pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming
That book is not arranged like a book. Nobody could actually learn D from it, even if it was fleshed out. It needs to be scrapped.
Sorry for my far-too-obtuse reference. ;-) What I was trying to get across was that there already exists a wiki platform for writing online books. As an example, there is the beginnings of a D Reference manual. If one wanted to, one could also use the same platform to write a "How To Program using D" style of book. As a start, why not write your proposed TOC as the opening page in such a new endeavor. I know I would like to contribute to it.
The main problem I have with wikibook is that, without somebody as the official, ordained editor, often people feel that they shouldn't make large rearrangements, when often it's the best solution. So, it can become fairly stagnant after the original editor either becomes disinterested or simply "finishes" it in his mind. - Gregor Richards PS: I'll start one this evening.
Sep 05 2006
next sibling parent Gregor Richards <Richards codu.org> writes:
 Gregor Richards wrote:
 
 Derek Parnell wrote:

 On Tue, 05 Sep 2006 15:17:05 -0700, Gregor Richards wrote:

 Derek Parnell wrote:

 On Mon, 04 Sep 2006 02:31:12 -0400, Agent Orange wrote:

 We should write a book about D, or even a D for C++ programmers 
 book. It would probably only be a handfull of chapters, and one or 
 a couple people could do each chapter. maybe even do it on a wiki 
 or something. I dont know how the styles would mesh but I just 
 thought this would be pretty cool to have.
May I refer you to http://en.wikibooks.org/wiki/D_Programming
That book is not arranged like a book. Nobody could actually learn D from it, even if it was fleshed out. It needs to be scrapped.
Sorry for my far-too-obtuse reference. ;-) What I was trying to get across was that there already exists a wiki platform for writing online books. As an example, there is the beginnings of a D Reference manual. If one wanted to, one could also use the same platform to write a "How To Program using D" style of book. As a start, why not write your proposed TOC as the opening page in such a new endeavor. I know I would like to contribute to it.
The main problem I have with wikibook is that, without somebody as the official, ordained editor, often people feel that they shouldn't make large rearrangements, when often it's the best solution. So, it can become fairly stagnant after the original editor either becomes disinterested or simply "finishes" it in his mind. - Gregor Richards PS: I'll start one this evening.
Lutger wrote:
 Great, what target audience do you have in mind? From the looks of the
 TOC it seems beginner. Maybe that is a suggestion, to keep in mind? Then
  perhaps the book should also adress or refer to programming and
 computer topics more general. Another option is to split it in parts or
 some other way of organization according to background of readers.

 Lack of books and tutorials is one of the arguments people have to not
 try D. It's partly true I guess, especially for beginners / novices.
 Even with one reasonable good wikibook I think D will beat C++ as a
 first language - and a lot of people start with C++.
Which is sort of terrifying, since C++ is one of those languages that hands you a rope and noose-tying instructions. - Gregor Richards
Sep 05 2006
prev sibling parent reply Chad J <gamerChad _spamIsBad_gmail.com> writes:
Lutger wrote:
 
 Lack of books and tutorials is one of the arguments people have to not 
 try D. It's partly true I guess, especially for beginners / novices. 
 Even with one reasonable good wikibook I think D will beat C++ as a 
 first language - and a lot of people start with C++.
 
C++ as a first language, ouch. I actually tried this. The examples in the book I was using didn't work. I was too much of a newbie to understand why. C++ wasn't very intuitive. The whole thing failed miserably. I've heard of other people learning C++ as a first, but I still find it hard to imagine normal human beings doing this without being taught in a class or some sort of interactive environment. Eventually I just learned programming through the scripting language in the EasyUO program. It was useful, easy, and taught me some basic programming. I think D would make a pretty good starting language. I looked at that TOC, maybe mention build at some point when doing modules (chap 7)? I'd hate to have to invoke dmd on every .d file or (cringe) use makefiles.
Sep 05 2006
parent ephemeros <ephemeros gmail.com> writes:
i agree with Chad J.
i'm a beginner too, i really need a book for beginners, as long as i 
don't understand a lot of programming techniques, their usefulness, etc. 
it should have examples for every aspect, everything explained from the 
beginning. it is hard to learn from the community as long as most of 
them are hardcore programmers, they cannot assume one doesn't know what 
"virtual" means or what's so great deal about "templates".
   i consider the examples most important (covering all the 
possibilities), theory to explain them, too, also pluses and minuses of 
techniques, their importance, how much they are used, etc. mabye it 
would be a good idea to have a successful c++ or java book as model, 
adding specific D features when they exist.
Sep 07 2006
prev sibling parent Gregor Richards <Richards codu.org> writes:
Agent Orange wrote:
 We should write a book about D, or even a D for C++ programmers book. It 
 would probably only be a handfull of chapters, and one or a couple 
 people could do each chapter. maybe even do it on a wiki or something. I 
 dont know how the styles would mesh but I just thought this would be 
 pretty cool to have.
The TOC is fairly stable. Time for people to submit text. http://en.wikibooks.org/wiki/A_Beginner%27s_Guide_to_D - Gregor Richards
Sep 06 2006