Talk:A Beginner's Guide to D
From Wikibooks, the open-content textbooks collection
It appears that somebody already put all the links in place, so I'm going to remove the cleanup-links macro - thanks :) --GregorR 14:55, 7 September 2006 (UTC)
"Basic Output [using std.cstream.dout]"
Why not std.stdio.writef/writefln for output because it seems more simple? Even if Phobos is not topic of the book, it would be much handier here. --Mbutscher 21:20, 13 September 2006 (UTC)
- I agree. I always use writefln, infact, I didn't know about the existance of dout until now!! Well, I knew something like that existed, but I thought it was in Mango, not in Phobos.
- Plus, one could say, this book is not about streams, therefore we should use writefln!
- Most D coders use writefln, so not teaching it here will confuse bigenners when they look at other people's codes. Hasan aljudy 21:58, 13 September 2006 (UTC)
[edit] Basics/Types and Math before "Basic Output"?
In "The Basics" maybe "Types and Math" should be moved before "Basic Output" and "Basic Input" as strings are explained in "Types ..." and are essential for input/output. --Mbutscher 18:51, 19 September 2006 (UTC)
[edit] Teaching Phobos
I agree we shouldn't be teaching a library, but to make examples more robust and fun a library would be good to fall back on. The most basic examples use input/output, and even the suggested din/dout are within Phobos. Even though most example for D code use writefln, I don't think you get to do that with Tango. I want to make the argument that if library calls are useful in an example that Phobos should be used.
The main point to using Phobos is that it comes with dmd. Those new to D aren't going to want to install 'patches' to their compiler. Depending on why someone is looking at D, they aren't even going to understand the difference from the language and the library. Even coming from another language such as C++, the person may overlook the library. The student is going to want to get things done, if they're learning the for-loop for the first time they might want to try it out on an input file, and whether we teach it in this book or not they will learn how to do it in Phobos.
I think it is important to state which library is being used in demonstrations I do not see a reason to make a big deal about it. Like stated before, people are going to be trying this language out and just want something don, they don't want to be bothered by the war within the D community. Will it cause problems in the future? Yes very likely, it could be that Tango becomes the standard library shipped with dmd. Luckily this book can be edited later. -- nascent, 29 August 2007

