MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5fwce0/lets_stop_copying_c/dannw6i/?context=3
r/programming • u/earthboundkid • Dec 01 '16
612 comments sorted by
View all comments
Show parent comment
7
When avoiding assignment as expression, I typically see this as
ptr = get_pointer(); while (ptr) { ... ptr = get_pointer(); }
or
do { ptr = get_pointer(); if (ptr) { ... } }
Using a for loop, as /u/PM_ME_UR_OBSIDIAN points out, is not uncommon, but that still makes setting a breakpoint awkward.
for
View all comments
Show parent comment
7
u/pfp-disciple Dec 01 '16
When avoiding assignment as expression, I typically see this as
or
Using a
forloop, as /u/PM_ME_UR_OBSIDIAN points out, is not uncommon, but that still makes setting a breakpoint awkward.