V2EX  ›  英汉词典
Enqueued related words: Implicit Conversion

Weak Typing

释义 Definition

弱类型:一种编程语言特性,指语言在运行时对数据类型的限制较弱,常会自动进行隐式类型转换(coercion),让不同类型的数据在同一运算中“凑合”工作;优点是灵活,缺点是更容易出现意料之外的结果。(注:不同语言/社区对“weak typing”的使用有时与“动态类型”混用,但严格来说两者并不等同。)

发音 Pronunciation (IPA)

/wiːk ˈtaɪpɪŋ/

例句 Examples

JavaScript is often cited as a language with weak typing.
JavaScript 常被认为是一种弱类型语言。

Because of weak typing and implicit coercion, the same expression may behave differently depending on the inputs, so careful validation is important.
由于弱类型和隐式类型转换,同一个表达式可能会因输入不同而表现不同,因此进行严格校验很重要。

词源 Etymology

weak 源自古英语 wāc,有“软弱的、不强的”之意;typing 来自 type(类型)+ -ing(名词化后缀),表示“类型系统/类型约束的方式”。合起来 weak typing 字面即“较弱的类型约束”,强调类型规则不严格、容易发生自动转换。

相关词 Related Words

文学与著作 Literary Works

  • JavaScript: The Good Parts(Douglas Crockford)
  • *You Don’t Know JS (series)*(Kyle Simpson)
  • Programming Language Pragmatics(Michael L. Scott)
  • Types and Programming Languages(Benjamin C. Pierce)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   850 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 21:43 · PVG 05:43 · LAX 13:43 · JFK 16:43
♥ Do have faith in what you're doing.