News for hackers. Stuff that matters.
Re:Why C++ sucks (2016 edition) by loup-vaillant on Monday February 22, 2016 @05:12AM (#11149772)
> I think you're deliberately making it more verbose than it needs to be.

I swear I am not. This is will be production code, for which I earn my salary. Your code is terser, but still fundamentally the same as mine. It's still unsafe (we could access the wrong union member), and it still has to work around incomplete definitions and the lack of trivial constructors (I wouldn't use pointers otherwise).

Automating my constructors and destructors would be amazing. Unfortunately, I don't know how to do it —not without writing over a hundred lines of cryptic boilerplate first.

There are no comments on this comment yet.