I'm Dumpin' it!

Meta via Digitalmars-d digitalmars-d at puremagic.com
Fri May 12 07:10:03 PDT 2017


On Friday, 12 May 2017 at 13:50:50 UTC, ixid wrote:
> I think the word dump would be too confusing for users based on 
> the history of the term in C. It should be 
> writeFormattedVariableLn. /sarcasm.
>
> Just parodying the frankly ridiculous response to 'print'.

In all seriousness, debugPrint or something similar might be a 
more informative name.

Otherwise, I like the functionality. I've written my own version 
of dump before in a couple projects and it'd be nice to have it 
in Phobos. Also as Andrea said, does `debug` obviate the need for 
dump to be @nogc nothrow @safe? Does the following work?

void test(int x) @nogc nothrow @safe pure
{
     debug dump!x();
}

As for it being pure, I see no reason why or how dump can be pure.


More information about the Digitalmars-d mailing list