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. Chris Paul 12.7K posts
- 2. Clippers 21.1K posts
- 3. Good Wednesday 24.7K posts
- 4. FELIX LV VISIONARY SEOUL 20.7K posts
- 5. #FELIXxLouisVuitton 24.2K posts
- 6. Hump Day 7,481 posts
- 7. rUSD N/A
- 8. jungkook 261K posts
- 9. #JUPITER 173K posts
- 10. The BIGGЕST 298K posts
- 11. #ALLOCATION 278K posts
- 12. Pat Spencer 2,822 posts
- 13. TOP CALL 9,947 posts
- 14. Kerr 5,821 posts
- 15. Lawrence Frank N/A
- 16. Brandy 8,759 posts
- 17. Elden Campbell N/A
- 18. Podz 3,420 posts
- 19. Shai 16.9K posts
- 20. #SeanCombsTheReckoning 6,259 posts
Something went wrong.
Something went wrong.