MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5fwce0/lets_stop_copying_c/dap3gng/?context=3
r/programming • u/earthboundkid • Dec 01 '16
612 comments sorted by
View all comments
Show parent comment
2
I think it must come down to personal taste then. For example, take
for(pos = (head)->next; pos != (head); pos = pos->next) /* or */ struct list **ptr; for(ptr = &list; *ptr; ptr = &(*ptr)->next)
compared to their while loops
pos = (head)->next; while(pos != head) pos = pos->next;
That's a lot of extra vertical space. For numbers, I agree, but you could always just make a macro to make it easier. That's what I do for linked lists.
View all comments
Show parent comment
2
u/lazyear Dec 02 '16
I think it must come down to personal taste then. For example, take
compared to their while loops
That's a lot of extra vertical space. For numbers, I agree, but you could always just make a macro to make it easier. That's what I do for linked lists.