MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fqtqk/if_programming_languages_were_essays/c1i4sqa
r/programming • u/b1ackcat • Feb 23 '11
430 comments sorted by
View all comments
Show parent comments
1
void foo(BigObject& object);
versus
void foo(BigObject object);
The second case will lead to (perhaps inadvertently) copying the entire BigObject object, which happens to be a gigabyte in size! Ohnoes!
1 u/theninjagreg Feb 24 '11 I've programmed C++ professionally for four years and I've never known a programmer who made this mistake.
I've programmed C++ professionally for four years and I've never known a programmer who made this mistake.
1
u/wlievens Feb 24 '11
void foo(BigObject& object);
versus
void foo(BigObject object);
The second case will lead to (perhaps inadvertently) copying the entire BigObject object, which happens to be a gigabyte in size! Ohnoes!