Carbon’s most exciting feature is its calling convention
Maybe I&#x27;m missing something, but I don&#x27;t see what&#x27;s special about Carbon here. In C++ the compiler can also optimize pass-by-const-reference to pass-by-value, and they do. It just can&#x27;t do it across an ABI boundary, but that should only be an issue with dynamic libraries, and Carbon has to follow the standard ABI there as well. Just make sure the compiler knows it doesn&#x27;t have to follow the standard ABI for every symbol in your program, e.g. by enabling LTO and setting -fvisibility=hidden. See what happens `add` is made static: <a href="https:&#x2F;&#x2F;godbolt.org&#x2F;z&#x2F;KsqxP5Pxh" rel="nofollow">https:&#x2F;&#x2F;godbolt.org&#x2F;z&#x2F;KsqxP5Pxh</a> (I also had to change foo() to avoid the compiler hardcoding the result of the single call in `add`).