Hey people, I'm passing lots of D function pointers to C, and naturally, the C api expects the fp signatures are all nothrow.
Which means, my D functions all look like this: void callback() nothrow { try { ...lots of code... } catch (Exception e) { ...log error or abort... } } I'm generally annoyed by all the extra indentation. Since nothrow is a central thing in D, I wondered if it would be reasonable to allow a nice little bit of sugar to assist working with nothrow that would look like this: void catchingCallback() nothrow { ...lots of code... } catch (Exception e) { ...log error or abort... } Syntactically similar to the existing in/out sections, although I think it would be nicer at the bottom... It's simply a lowering which wraps the entire function body scope in a try. It's not a really big deal, but it would feel a whole lot tidier in my existing code. I don't imagine how it would really affect anything else. Terrible idea?