Debug prints in @nogc
Seb via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Aug 31 08:10:11 PDT 2016
On Tuesday, 30 August 2016 at 19:03:06 UTC, Nordlöw wrote:
> On Tuesday, 30 August 2016 at 17:11:48 UTC, Johannes Pfau wrote:
>> Nice! Here's a slightly modified version:
>> https://dpaste.dzfl.pl/8c5ec90c5b39
>>
>> This version does not need an additional delegate. It can be
>> used like this:
>>
>> assumeNogc!writefln("foo %s", 42);
>> assumeNogc!writeln("foo", 42);
>
> Marvellous!
+1
> I update my cryptic but short-and-sweet `dln` at
>
> https://github.com/nordlow/phobos-next/blob/master/src/dbg.d#L58
>
> I would love to see this very useful little snippet make its
> way into Phobos somehow. Any suggestions on how?
I am trying to push for a dump method in Phobos, we could try to
combine it:
https://github.com/dlang/phobos/pull/4318
AssumeNogc is potentially dangerous, so I don't know whether it
can make it directly, but only if you try you know ;-)
More information about the Digitalmars-d-learn
mailing list