[Joke] C++ and D namings
deadalnix
deadalnix at gmail.com
Thu Jan 21 12:14:01 UTC 2021
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...
Yup, one things that people miss is that noexcept actually makes
things more expensive because the compiler has to add checks that
you aren't throwing something. These are runtime checks that
happen when unwinding an exception.
More information about the Digitalmars-d
mailing list