[Joke] C++ and D namings

John Colvin john.loughran.colvin at gmail.com
Thu Jan 21 11:12:43 UTC 2021


On Thursday, 21 January 2021 at 09:49:40 UTC, Walter Bright wrote:
> On 1/20/2021 2:51 AM, claptrap wrote:
>> nothrow is still a terrible name for something that can still 
>> throw.
>
> I tend to agree.
>
> My thinking has evolved over the years, and I now think that 
> Error should never be thrown, ever. If you have a 
> non-recoverable error, you should just exit or call a user 
> specified function. Not attempt to unwind the stack.
>
> If someone wants to put a DIP out for that, I'd be favorably 
> inclined.

We already have a compiler switch that is almost that.

   -checkaction=[D|C|halt|context]
                     behavior on assert/boundscheck/finalswitch 
failure

now if we had a version of that switch that could apply to all 
`throw x` where `is(typeof(x) : Error)) then that'd be great.

It's worth saying that we do depend on being able to catch Errors 
at Symmetry*, our situation is a little unusual though.

* "we are happy when a thrown Error is caught in some limited 
circumstances" not "our program is incorrect if any particular 
thrown Error is not caught"


More information about the Digitalmars-d mailing list