V2EX  ›  英汉辞典

Namespace

释义 Definition

namespace(名词):命名空间;用于把名称(如变量、函数、类、标识符等)划分到不同的“空间/范围”中,以避免重名冲突,并帮助组织代码或资源。(在编程、数据库、XML、网络等语境中尤常见)

发音 Pronunciation

/ˈneɪm.speɪs/

例句 Examples

A namespace keeps class names from colliding.
命名空间可以防止类名发生冲突。

In large projects, we separate modules into different namespaces so the codebase stays organized and easier to maintain.
在大型项目中,我们把模块分到不同的命名空间里,这样代码库更有组织,也更容易维护。

词源 Etymology

name(名称)+ space(空间)组合而成,字面意思是“名字的空间”。最早在计算机与信息组织领域中广泛使用,用来表示“名称的作用域/归属范围”,从而减少歧义与冲突。

相关词 Related Words

文学与著作 Literary Works

  • The C++ Programming Language(Bjarne Stroustrup)
  • C# in Depth(Jon Skeet)
  • Effective Java(Joshua Bloch)
  • Programming Python(Mark Lutz)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2507 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 8ms · UTC 10:39 · PVG 18:39 · LAX 02:39 · JFK 05:39
♥ Do have faith in what you're doing.