since there's ongoing discussions about exceptions, just wanted to mention D's recent-ish addition which was integrated in https://dlang.org/changelog/2.079.0.html#dip1008
void main() @nogc
{
throw new Exception("I'm @nogc now");
}
DIP: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md
Curious whether something like this would work in Nim.
Wow, this is pretty scary: https://github.com/dlang/DIPs/blob/master/DIPs/DIP1008.md#breaking-changes
Does D not offer any backwards compatibility guarantees?
yes, they're usually very careful with backwards compatibility (definitely pros and cons about that though, on the cons side, certain flaws (eg auto-decoding strings) might never be fixed)
hence the caveat: "can be previewed under the experimental -dip1008 flag"