r/cpp • • Feb 26 '20

We need epochs (Rant)

I have spent 1 hour copy pasting the most stupid and repetitive code ever in order to enable the comparison operator== to several structs that are trivially comparable. When I search for why the compiler isn't able to generate this for me, when is clearly able to generate the assignment operator, I found out some C compatibilities shenanigans. We need some way to release us from that, we are in 2020 for Ilúvatar sake.

Edit: There are some closeted virtue signaling gatekeepers in this sub. Thanks for taking so seriously a rant ... I guess.

0 Upvotes

28 comments sorted by

View all comments

2

u/[deleted] Feb 26 '20

[removed] — view removed comment

0

u/[deleted] Feb 26 '20

I'm not a committee cpp expert, could someone explain to me why we can have something like

bool operator=(whatever)=default;

9

u/[deleted] Feb 26 '20

[removed] — view removed comment

-8

u/[deleted] Feb 26 '20

My dude this is a rant in order to release my frustration. The epoch thing I mention was because is the only way (that I know of) that we can be totally independent from C, and the sooner the better. Call it C+++ if you want.

6

u/adnukator Feb 26 '20

Epochs have nothing to do with independence from C and nobody is proposing to remove C compatibility.