News for hackers. Stuff that matters.
Re:dotNET (OK, C#) gets union types by xigoi on Sunday May 24, 2026 @11:27AM (#48258040)
> WTF is Z?

Hopefully a type error, because no sane programmer would implement addition like this. Obviously an insane programmer could, but that’s not the fault of operator overloading. The following code is exactly as confusing:

    Person x;
    Job y;
    CustomType z = add(x, y);
Re:dotNET (OK, C#) gets union types by tpxl on Sunday May 24, 2026 @01:03PM (#48259023)
I don't know; you can bit shift an output stream by a string (or char array) in C++ (std::cout << "Hello, world!"). That seems pretty mad to me.
Re:dotNET (OK, C#) gets union types by xigoi on Sunday May 24, 2026 @01:14PM (#48259112)
Are you trying to imply that Bjarne Stroustrup is a sane programmer?