Matthew Ong Wrote:

> Perhaps format like coffee using more interesting side by side 
> comparison and with more writefln/writeln rather than assert.
> Assert does not show anything visually.

I understand this position and that new programers of D find it odd that 
examples don't have any output. However I have taking a liking to using assert 
as it documents what is expected and there is no need for a comment. On top of 
that it gets people familiar with assert and potentially using it in their own 
code and the icing is that unittests are built in the same manner (you should 
expect no output when everything is OK).

In fact I have an introduction to programming book which uses just assert for 
most of the examples so far.

http://nascent.freeshell.org/programming/D/LearningWithD.pdf

Reply via email to