[Joke] C++ and D namings

Meta jared771 at gmail.com
Wed Jan 20 03:56:24 UTC 2021


On Wednesday, 20 January 2021 at 03:26:42 UTC, Ola Fosheim 
Grostad wrote:
> On Wednesday, 20 January 2021 at 01:17:36 UTC, Meta wrote:
>> On Wednesday, 20 January 2021 at 01:04:07 UTC, Andrei 
>> Alexandrescu wrote:
>>> On 1/19/21 4:50 PM, Q. Schroll wrote:
>>>> In C++, the noexcept specifier means you cannot throw 
>>>> anything.
>>>> In D,   the nothrow  specifier means you cannot throw 
>>>> Exceptions, but anything else.
>>>
>>> Except that in C++, noexcept really means you can throw 
>>> anything but you're not supposed to. Important distinction...
>>
>> I've never understood why that is. Do you have any insight 
>> into why noexcept is so useless? Why was it designed that way?
>
> Why do you think a call to terminate() is useless?

Okay, useless in terms of static guarantees, and definitely 
compared to nothrow (or even Java's exception specifications 
IMO). It's not *completely* useless, just mostly useless.


More information about the Digitalmars-d mailing list