全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Value semantics, reference semantics?

又称: value semantics · reference semantics

Definition 2.3 University Computer Science — Year 2 · 第 2 章 — Copying, Moving and Smart Pointers

A type has value semantics if a copy of an object is a new, independent object with the same value: changing one never changes the other, as with int, std::string and the Buffer of Listing 2.3. A type has reference semantics if copying an object gives a second name for the same underlying data, as with a pointer, or with every object in Python.

在原文中阅读 →