知识卡片

普通读书笔记卡 · 1841.h.1.a.1.a.3.e

值与身份的共变

理解等级:中级

值共变要求一组值共同改变以维持不变量,例如矩形顶点或跨存储事务;身份共变要求各方引用同一个对象或共享结构。前者不只是字段相关,后者不只是值相等。识别这两种运行时关联,能避免错误拆分必须共同协调的行为。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Evolutionary Architecture Topologies · 查看原书依据

      This occurs when several values relate to one another and must change together. Consider the case where a developer has defined a rectangle as four points, representing the corners. To maintain the integrity of the data structure, the developer cannot randomly change one of the points without considering the impact on the other points. A more common and problematic case involves transactions, especially in distributed

    参考来源

    - 位置:《Building Evolutionary Architectures Automated Software Governance, 2nd Edition》第05章《Evolutionary Architecture Topologies》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Evolutionary Architectures Automated Software Governance, 2nd Edition/_epub-src/OEBPS/ch05.html;段落定位:This occurs when several values relate to one another) - 结论依据:原文对“值与身份的共变”的定义或案例,支撑“值共变要求一组值共同改变以维持不变量,例如矩形顶点或跨存储事务;身份共变要求各方引用同一个对象或共享结构”的归纳。据其上下文,前者不只是字段相关,后者不只是值相等。 - 原始内容:This occurs when several values relate to one another and must change together. Consider the case where a developer has defined a rectangle as four points, representing the corners. To maintain the integrity of the data structure, the developer cannot randomly change one of the points without considering the impact on the other points. A more common and problematic case involves transactions, especially in distributed