digitalmars.D - flag -ignore_nogc to allow breaking nogc rules during debugging
- Timothee Cour via Digitalmars-d (15/15) Jan 10 2016 this would make error handling trivial and solve issues such as this:
- rsw0x (3/19) Jan 10 2016 is there a valid reason that debug shouldn't just ignore @nogc?
- Timothee Cour via Digitalmars-d (4/29) Jan 10 2016 just more fine-grained control ... but either way.
- Guillaume Piolat (3/5) Jan 10 2016 Is it a bit annoying to use, but have you aware of:
this would make error handling trivial and solve issues such as this: FORUM:formatted assert error messages inside nogc functions http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=J2kaTZ6t9-upTAtg mail.gmail.com usage: during development: dmd -debug -ignore_nogc other_flags foo.d during release: dmd other_flags foo.d nogc void test(int a){ version(ignore_nogc) assert(a==1, text("a = ", a)); else assert(a==1, "a = ?"); }
Jan 10 2016
On Sunday, 10 January 2016 at 09:17:20 UTC, Timothee Cour wrote:this would make error handling trivial and solve issues such as this: FORUM:formatted assert error messages inside nogc functions http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=J2kaTZ6t9-upTAtg mail.gmail.com usage: during development: dmd -debug -ignore_nogc other_flags foo.d during release: dmd other_flags foo.d nogc void test(int a){ version(ignore_nogc) assert(a==1, text("a = ", a)); else assert(a==1, "a = ?"); }is there a valid reason that debug shouldn't just ignore nogc? this is also an issue with contracts iirc
Jan 10 2016
just more fine-grained control ... but either way. having an escape away from nogc would be needed. On Sun, Jan 10, 2016 at 1:56 AM, rsw0x via Digitalmars-d < digitalmars-d puremagic.com> wrote:On Sunday, 10 January 2016 at 09:17:20 UTC, Timothee Cour wrote:this would make error handling trivial and solve issues such as this: FORUM:formatted assert error messages inside nogc functions http://forum.dlang.org/thread/CANri+EyNyrhMWGCSqZHx_vXDJFSrwhOrV=J2kaTZ6t9-upTAtg mail.gmail.com usage: during development: dmd -debug -ignore_nogc other_flags foo.d during release: dmd other_flags foo.d nogc void test(int a){ version(ignore_nogc) assert(a==1, text("a = ", a)); else assert(a==1, "a = ?"); }is there a valid reason that debug shouldn't just ignore nogc? this is also an issue with contracts iirc
Jan 10 2016
On Sunday, 10 January 2016 at 12:33:19 UTC, Timothee Cour wrote:just more fine-grained control ... but either way. having an escape away from nogc would be needed.Is it a bit annoying to use, but have you aware of: http://p0nce.github.io/d-idioms/#Bypassing- nogc ?
Jan 10 2016