且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

标准库类型的赋值运算符的ref限定词

更新时间:2022-06-22 23:58:08

您的建议是对向后兼容性的担忧" .

Your suggestion was proposed in 2009, and ultimately rejected in Frankfurt that year over "concerns about backwards compatibility".

这将是一个巨大的变化,我们不喜欢这些.

It would have been a breaking change, and we don't like those.

无论如何,现有禁止分配内置类型右值的禁令仅具有有限的实际价值,因此可能破坏现有代码的成本为.

The existing prohibition against assigning to rvalues of built-in types is only of limited real value anyway, so the cost of potentially breaking existing code was almost certainly deemed to be "not worth it".

如果我们的表盘整洁,是否会以这种方式设计图书馆?也许.

Would the library be designed in this manner if we had a clean slate? Perhaps.