r/ProgrammerHumor • • Oct 07 '26

Meme wasteOfPreciousSpace

Post image
7.2k Upvotes

244 comments sorted by

View all comments

Show parent comment

1

u/evil0sheep Oct 07 '26

I believe this is what std::vector<bool> does under the hood.

2

u/AOAqua Oct 07 '26

I honestly never used them, and we were forbidden from using C++. Only plain C all the way with assembly sometimes so there as little unexpected behaviour as possible

1

u/Cultural_Version734 Oct 08 '26

Are you me? I work in FW and we only use C

1

u/AOAqua Oct 08 '26

Yes, I worked with firmware for microcontrollers as well

1

u/evil0sheep Oct 08 '26

That’s pretty hardcore. What’s an example of unexpected behavior you see with C++?

1

u/AOAqua Oct 08 '26

Really? It wasn't my decision

1

u/evil0sheep Oct 09 '26

Nah man I’m just low key roasting you for saying that C++ yields unexpected behavior lol. What’s unexpected about it? It’s not like it has a garbage collector. It literally always does exactly what the spec says it will do

1

u/Great-Powerful-Talia Oct 07 '26

and everyone hates it because you suddenly can't get pointers to the elements. People often specifically use uint8_t to get past this "feature".

1

u/evil0sheep Oct 07 '26

Hey man I’m not here to defend the design of STL lol. This isn’t even like top 5 offenses