V2EX  ›  英汉词典

Effective Type

定义 Definition

effective type(常见于 C 语言标准与编译器语境):指一个对象在某一时刻“被当作什么类型来访问/读取/写入”的类型。它影响别名分析(aliasing)、优化,以及某些通过指针转换读写内存的代码是否属于未定义行为。此术语主要是技术用语,在日常英语中不常单独使用。

发音 Pronunciation (IPA)

/ɪˈfɛktɪv taɪp/

例句 Examples

The effective type of this object is int.
这个对象的有效类型是 int。

Because the compiler assumes the effective type doesn’t change arbitrarily, accessing the same memory through an incompatible pointer type can break optimizations.
由于编译器假设有效类型不会被随意改变,用不兼容的指针类型访问同一块内存可能会破坏优化并导致未定义行为。

词源 Etymology

effective 源自拉丁语 efficere(完成、产生效果),强调“实际起作用的”。type 源自希腊语 typos(印记、模型),引申为“类别/类型”。合在一起,在编程语境中就是“实际生效的访问类型”。

相关词 Related Words

文学与作品 Literary Works

  • *ISO/IEC 9899:2011 (C11 Standard)*(C 语言标准文本中系统定义并使用 “effective type”)
  • *ISO/IEC 9899:1999 (C99 Standard)*(同样讨论对象的 effective type 与别名规则)
  • C: A Reference Manual(Harbison & Steele,讲解 C 语言规则时涉及 effective type/aliasing 相关概念)
  • Expert C Programming: Deep C Secrets(Peter van der Linden,讨论指针、内存别名与相关陷阱时常触及该概念)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   1695 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 05:33 · PVG 13:33 · LAX 21:33 · JFK 00:33
♥ Do have faith in what you're doing.