I am not sure where your code is going to depend in such tiny amount of space and if you use microcontrollers, it is possible you discard much of std anyways.
So this looks to me like hyperbole and complaining for the sake of doing it.
I think this design, given that C++ has no destructive move, is about the best that we can get and I do not think it is that "unergonomic" as I see all around here.
not sure where your code is going to depend in such tiny amount of space a
Well, you just lack experience solving some types of problems. You can imaging having millions or perhaps billions of objects you are creating and tracking .. in that situation every byte matters.
I have had to hand-roll my own containers more than once to shave 8 bytes here, 12 bytes there. It starts to stack up when we are talking about billions of objects. 1 billion times 8 is 8 GB.
So this looks to me like hyperbole and complaining for the sake of doing it.
No. I have 30 years' experience writing programs. Some problems care about RAM/space.
I think this design, given that C++ has no destructive move, is about the best that we can get and I do not think it is that "unergonomic" as I see all around here.
Well, you just lack experience solving some types of problems.
I think you lack experience with std::indirect and std::polymorphic. We have been using them in production for several years now, and not once has their supposed nullability been an issue.
Yes, after over 20 years coding, I know what a corner case is. Just create a wrapper your own or specialize optional if the standard lets you.
It seems that for 30 years of coding you cannot handle the situation properly. I am not here to take such basic 98% of the time made-up imaginary lessons.
View all comments
Show parent comment
8
u/germandiago Aug 14 '26
I am not sure where your code is going to depend in such tiny amount of space and if you use microcontrollers, it is possible you discard much of std anyways.
So this looks to me like hyperbole and complaining for the sake of doing it.
I think this design, given that C++ has no destructive move, is about the best that we can get and I do not think it is that "unergonomic" as I see all around here.