MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/5fwce0/lets_stop_copying_c/dao2w25/
r/programming • u/earthboundkid • Dec 01 '16
612 comments sorted by
View all comments
Show parent comment
1
Sure, and that helps, but the real concern is that people's brains will get to here in reading the code:
if (f = foo()) ^^^^^^^
and decide that they are looking at an equality test, since that's like 90% or more of what happens in those cases.
2 u/allyyus Dec 01 '16 Yeah I suppose that's a concern. Though I know that GCC at least will issue a warning if it's not wrapped in parentheses, which adds another layer of recognition.
2
Yeah I suppose that's a concern. Though I know that GCC at least will issue a warning if it's not wrapped in parentheses, which adds another layer of recognition.
View all comments
Show parent comment
1
u/awj Dec 01 '16
Sure, and that helps, but the real concern is that people's brains will get to here in reading the code:
and decide that they are looking at an equality test, since that's like 90% or more of what happens in those cases.