Hacker News new | ask | show | jobs
by exprL 4151 days ago
There's certainly no reason to pass something (big) by value if you only need to look at it, but not copy. However, if you're going to copy the object in any case, you should do it right-away so that the caller my move their copy to you if they don't need one any more.

I'm guessing this detection is for those cases where the passed-by-ref value is always copied.