[Joke] C++ and D namings

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Wed Jan 20 03:59:02 UTC 2021


On Wednesday, 20 January 2021 at 01:30:15 UTC, H. S. Teoh wrote:
> I'm not the least surprised.  After all, this is C++, the same 
> language that lets you write 'const' on something, and then in 
> the same breath write 'const_cast<...>' to pretend that you 
> never wrote it, all the while your caller still believes that 
> you're honoring your word on the 'const'.
>
> Nothing new under the sun. ;-)

Modifying it after const cast is undefined behaviour according to 
cppreference. How would you prevent it? You can do the same in D.

Noexcept in c++ makes perfect sense: 
noexcept(runtimewithoutexceptions)




More information about the Digitalmars-d mailing list