V2EX  ›  英汉词典
Enqueued related words: Monomorphization

Static Dispatch

释义 Definition

静态派发:在编译期就确定要调用的具体函数/方法(或操作的实现)的机制,而不是在运行期再根据对象的实际类型决定。常见于函数重载解析模板实例化、以及某些语言中与动态派发(virtual/override)相对的非虚调用

发音 Pronunciation (IPA)

/ˈstætɪk dɪˈspætʃ/

例句 Examples

Static dispatch resolves the method call at compile time.
静态派发会在编译期确定方法调用的目标。

In C++, templates often rely on static dispatch, which can improve performance but may increase compile times and code size.
在 C++ 中,模板常常依赖静态派发,这可能提升性能,但也可能增加编译时间和生成代码的体积。

词源 Etymology

static 源自希腊语 statikos(“使其站立、稳定的”),强调“固定不变/预先确定”;dispatch 来自拉丁语 dispatchare(经由法语发展,意为“迅速处理、派遣/发送”)。合起来在编程语境中表示:调用目标被“预先固定地处理并发出”,即在编译期就决定“派发到哪里”。

相关词 Related Words

文学与著作中的用例 Literary Works

  • The C++ Programming Language(Bjarne Stroustrup):在讨论虚函数与模板等机制时,常涉及“编译期绑定/静态派发”的思想。
  • *Effective C++*(Scott Meyers):在性能与接口设计相关条目中,经常对比静态绑定(可视作静态派发的一部分)与动态绑定。
  • Programming Language Pragmatics(Michael L. Scott):在语言实现与绑定时间(binding time)章节中,会以静态/动态分派作为典型概念。
  • Design Patterns: Elements of Reusable Object-Oriented Software(Gamma et al.):在讨论多态与运行期/编译期机制取舍时,常引出静态与动态分派的对照。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   672 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 21:03 · PVG 05:03 · LAX 13:03 · JFK 16:03
♥ Do have faith in what you're doing.