Deep nesting vs early returns

Tobias Müller troplin at bluewin.ch
Fri Oct 5 21:46:06 UTC 2018


H. S. Teoh <hsteoh at quickfur.ath.cx> wrote: 
> I've had to work with code that had multiply-nested #define macros
> involving `do {} while(0)`, and have hated every minute of it.

Yes it's ugly but it's also the only way to define a multi-statement macro
that can be used like a function.

---
Tobias


More information about the Digitalmars-d mailing list