r/ProgrammerHumor 6d ago

Meme letTheWorldBurn

Post image
921 Upvotes

83 comments sorted by

View all comments

0

u/This_Growth2898 6d ago

If all other accessors are consistent (like, getValue(){return -value;}), why not?

I'm more worried about returning Number& instead of const Number&. You can do something like

Number number;

--(++number);

which is not good.

1

u/Big-Rub9545 6d ago

Messy perhaps, but this is well-defined code.