r/cpp • • Feb 26 '26

The Joy of C++26 Contracts - Myths, Misconceptions & Defensive Programming - Herb Sutter

https://www.youtube.com/watch?v=oitYvDe4nps&t=1s
73 Upvotes

84 comments sorted by

View all comments

Show parent comment

7

u/DapperCore Feb 27 '26 edited Feb 27 '26

He has a 5 minute rant in one of his videos where he confidently claims that bools are 64bits because the word size on modern computers is 64bits. I don't think he's as qualified as he makes himself out to be, especially when it comes to topics outside the web dev space.

3

u/v_maria Feb 27 '26

Haha oops. Well he has some cred but thats very silly yes

1

u/sammymammy2 Mar 01 '26

I guess they take up a register…

1

u/pjmlp Mar 01 '26

To be fair, in many CPUs you cannot do a single byte fetch from RAM, so you are going to have a 64 bits coming into a register through a few cache levels, before that single byte for the boolean.

2

u/DapperCore Mar 01 '26

The context was for storing the state of a million checkboxes in an array.