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. Cowboys 73.5K posts
- 2. #heatedrivalry 24.3K posts
- 3. Gibbs 20.2K posts
- 4. LeBron 105K posts
- 5. Lions 91.2K posts
- 6. Pickens 14.5K posts
- 7. scott hunter 4,991 posts
- 8. fnaf 2 25.9K posts
- 9. Brandon Aubrey 7,343 posts
- 10. #OnePride 10.5K posts
- 11. Paramount 19.9K posts
- 12. Shang Tsung 28.5K posts
- 13. Warner Bros 20.4K posts
- 14. Ferguson 10.9K posts
- 15. Eberflus 2,664 posts
- 16. CeeDee 10.6K posts
- 17. #PowerForce N/A
- 18. Goff 8,714 posts
- 19. #criticalrolespoilers 2,010 posts
- 20. Bland 8,608 posts
Something went wrong.
Something went wrong.