DIP 1029---Add throw as Function Attribute---Community Review Round 1

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 15 18:20:00 UTC 2020

On Wed, Jan 15, 2020 at 05:16:18PM +0000, Guillaume Piolat via Digitalmars-d wrote:
> On Tuesday, 14 January 2020 at 23:04:02 UTC, Adam D. Ruppe wrote:
> > On Tuesday, 14 January 2020 at 22:30:40 UTC, Walter Bright wrote:
> > > Hence, when "nothrow" becomes the default
> > 
> > IF, not when. I support this DIP as a nice independent move, but I
> > am going to fight you on the step of changing the default.
> > 
> +1 it's a strange misguided idea in the absence of something better
> than exceptions.

As I already pointed out in another thread, I suspect that Walter's beef
against exceptions is not really the exceptions themselves, but their
*current implementation* in the form of mandatory stack frames and their
associated setup, and stack unwinding which is unwieldy to implement and
expensive at runtime to execute.

Elsewhere in said other thread we've already come up with a potential
alternative implementation that still allows you to throw errors -- just
in a more lightweight form that doesn't require expensive stack frame
setup and unwieldy stack unwinding code.  At the user code level, it
could even retain exactly the same syntax, and work pretty much the same
as before, just the actual implementation will follow a different


Too many people have open minds but closed eyes.

More information about the Digitalmars-d mailing list