[Joke] C++ and D namings

Ola Fosheim Grostad ola.fosheim.grostad at gmail.com
Wed Jan 20 05:48:28 UTC 2021


On Wednesday, 20 January 2021 at 05:12:15 UTC, Ola Fosheim 
Grostad wrote:
> Wasnt D supposed to eliminate UB?
>
> How about this?
>
> union t {int x; const int y;};

Or worse:
import std.stdio;
union t {int x; immutable int y;};
void main()
{

     t a;
     a.x=3;
     writeln(a.y);
     a.x=4;
     writeln(a.y);
}


More information about the Digitalmars-d mailing list