ever see those videos pointing out how bools can be described by other information? generally, bools are often used to describe whether something exists or not "isPublished", true or false? no, it has a publish date. it's obviously published. tutorial ah example but, anyway
One of the core learnings for me from Meeting C++ 2025 was when James McNellis showed that bool has 3 not two possible values. Thats its not just true and false, but can also be undefined/not initialized.
This gonna get clearer when the lightning talk gets published. While bool is true or false, it occupies often a byte in memory, which can hold more states then the two. Which leads to problems with corrupted data, the optimizer assuming only two values or logic building on this.
Your initial comment is well worth remembering (even if off topic WRT the slide). bools in API should (most of the time) be inspection of something in an object, not an exposure of a bool member value/field.
United States الاتجاهات
- 1. Brian Cole 31.2K posts
- 2. #TrumpAffordabilityCrisis 4,645 posts
- 3. Eurovision 93.2K posts
- 4. #Kodezi 1,168 posts
- 5. #EndRevivalInParis 10.9K posts
- 6. Tong 18.6K posts
- 7. Rwanda 31.1K posts
- 8. Woodbridge 5,343 posts
- 9. Jalen Carter 1,423 posts
- 10. #NationalCookieDay 1,588 posts
- 11. #OlandriaxHarvard 1,341 posts
- 12. KJ Jackson N/A
- 13. Wray 12.2K posts
- 14. TPUSA 74.8K posts
- 15. Chadwick 1,060 posts
- 16. Congo 30.7K posts
- 17. Price 263K posts
- 18. Legend Bey 1,207 posts
- 19. Black Album 2,023 posts
- 20. Jermaine 3,933 posts
Something went wrong.
Something went wrong.