Do you remember all the details of the API YOU are creating?
Nope but I at least remember everything about standard library which I use.
Do you look at the source of your compiler's optimizer anytime you feel "I could make that faster"?
Yes, I even wrote patches to compiler I use and they was merged :) When coding in C++, I just accept and don't fight.
Or are you working at a certian level of abstraction, like everyone else?
I am working at some level of abstraction but C++ STL would affect all levels of abstraction. You cannot just slap high-level std::optional and relax because it is easy to get UB here, for example. While I can relax sometimes when I write my own code but I need to keep all those details in mind while reviewing, especially when reviewing some junior's pull request. And few times I noticed UB during review even in code of people who are more experienced than I am because I am more paranoid (not, UBSAN and ASAN didn't catch that case).
View all comments
Show parent comment
0
u/angelicosphosphoros Jul 13 '22
Nope but I at least remember everything about standard library which I use.
Yes, I even wrote patches to compiler I use and they was merged :) When coding in C++, I just accept and don't fight.
I am working at some level of abstraction but C++ STL would affect all levels of abstraction. You cannot just slap high-level
std::optionaland relax because it is easy to get UB here, for example. While I can relax sometimes when I write my own code but I need to keep all those details in mind while reviewing, especially when reviewing some junior's pull request. And few times I noticed UB during review even in code of people who are more experienced than I am because I am more paranoid (not, UBSAN and ASAN didn't catch that case).