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-upt...@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 = ?");

}

Reply via email to