Example within documentations of D seriously need some improvement.

Matthew Ong ongbp at yahoo.com
Sat May 28 01:16:20 PDT 2011


On 5/28/2011 3:27 AM, Walter Bright wrote:
> On 5/27/2011 12:02 PM, Jesse Phillips wrote:
>> Matthew Ong Wrote:
Hi Walter,
With all due respect for creating such a advance programming tool.
How ever, there are plenty of rooms for improvement in helping new
person to learn and adapt D.


> I tend to prefer the unambiguous:
> assert(1+2==3);
Yes. That Logically correct. The author understands it, but does the new 
reader?
> as opposed to the wordy and possibly misinterpreted:
> writeln(1+2); // should print 3
No that is not wordy. What is being communicated here?

Proper comment and proper output.
writeln(1+2); // should print 3, numbers are added.

How about string? No comment and No output.
assert("abc"~"13"=="abc13");
People from Awk, C++, Java, ... read that totally different.
Please consider mindfully.

Please see my other post for more detail comment on the Book.
Sucessful book publisher has done the detail research on how to 
communicate and draw attentions from reader.

Do some simple survey with uni CP2 students and Year 1 working person.

Properly done, it will be a good advantage for D Community pick up rate.

-- 
Matthew Ong
email: ongbp at yahoo.com



More information about the Digitalmars-d mailing list