Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think in part because do … while expects a ; at the end so you are obliged to provide one, which makes the macro feel more like a “real” function call.

if … else {} you could omit the ;



Good point, thank you. The while (0) demands the expected ; The trailing else hopes for the expected ; but would tolerate a wide range of nonsense instead.




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

Search: