"Try it now"

bearophile bearophileHUGS at lycos.com
Wed Apr 13 17:56:55 PDT 2011


Andrei:

> I disagree. I find examples that use assert() much clearer than examples 
> that print something to the console and then explain in a comment what 
> you ought to be seeing.

I don't understand why you say that. Isn't learning and understanding based on feedback? If all the examples do is to show the same "assert passed" message, then what's the point in running the examples? Just reading a static page gives the same insight. You are able to modify them, of course, and see the modified asserts fail, and you may add a writeln statement yourself, but... having to modify each example to see some feedback is not a good default. I'd like to know if other people agree with you on this.

Bye,
bearophile


More information about the Digitalmars-d mailing list