"Try it now"
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Apr 13 17:38:44 PDT 2011
On 4/13/11 6:11 PM, bearophile wrote:
> Adam D. Ruppe:
>
>> * Since most of them don't actually output anything, the program
>> now detects output.length == 0 and says "Program run
>> successfully." upon completion to give some feedback.
>
> This is a problem. Unittest code is not meant to produce an output, while online snippets to try are meant to nearly always produce a meaningful output.
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.
Andrei
More information about the Digitalmars-d
mailing list