Hacker News new | past | comments | ask | show | jobs | submit login
CppCon 2017: Louis Brandy “Curiously Recurring C++ Bugs at Facebook” (youtube.com)
21 points by victorvation on May 10, 2018 | hide | past | favorite | 2 comments



#6 really got me (won't spoil it for anyone, but): is this the same reason arr[n] and [arr]n are the same in C? The {square,curly} braces are just sugar?


I don't think it's the same. arr[n] and [arr]n works because brackets simply expand to * (arr + n) in the first case, * (n + arr) in the second.

C++ dictates if a statement can be interpreted as a declaration, it will be (see "The most vexing parse"). Universal initialization was introduced to provide another way to ensure this doesn't happen.

https://softwareengineering.stackexchange.com/questions/1336...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: