[Article Contest, first draft] D Slices
Jesse Phillips
jessekphillips+D at gmail.com
Wed May 18 16:48:12 PDT 2011
Steven Schveighoffer Wrote:
> I always wonder about that. One of the issues with assert for people
> "feeling" out the language is, a passing assert doesn't seem to do
> anything.
>
> For instance, in this example, if you take the code I wrote, and compile
> it, you'll get a loud assertion error (proving the assertion runs and
> fails).
>
> If you take your code and run it, you get a command prompt. It doesn't
> really help you see how it works.
>
> I'm contemplating switching it to a writeln instead ;)
>
> -Steve
Go with writeln, I understand that concern. The counter point I have is that this is how unittests work and much of the documentation has been written.
More information about the Digitalmars-d
mailing list