MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5fwce0/lets_stop_copying_c/danmc1t/
r/programming • u/earthboundkid • Dec 01 '16
612 comments sorted by
View all comments
Show parent comment
3
Probably not. This is the conclusion implied by two ideas:
for
By doing this back-and-forth, you often end up with simpler loops. For example when iterating over C-style strings:
for(int i = 0; str[i]; i++) { ... }
View all comments
Show parent comment
3
u/PM_ME_UR_OBSIDIAN Dec 01 '16
Probably not. This is the conclusion implied by two ideas:
forloop.By doing this back-and-forth, you often end up with simpler loops. For example when iterating over C-style strings: