V2EX  ›  英汉词典

Transpile

定义 Definition

Transpile(动词)指将一种编程语言的源代码转换为另一种相同抽象层级的编程语言的源代码。与"编译"(compile)不同,transpile 强调的是源代码到源代码的转换,而非源代码到机器码的转换。

发音 Pronunciation

/trænzˈpaɪl/

例句 Examples

TypeScript code is transpiled into JavaScript before it runs in the browser.
TypeScript 代码在浏览器中运行之前会被转译为 JavaScript。

When we transpile our codebase from Python 2 to Python 3, we need to carefully review the output to ensure that subtle behavioral differences don't introduce bugs.
当我们将代码库从 Python 2 转译为 Python 3 时,需要仔细检查输出,以确保细微的行为差异不会引入错误。

词源 Etymology

Transpile 是一个混成词(portmanteau),由 transform(转换)和 compile(编译)合并而成,最早出现于20世纪末的计算机科学领域。随着 Web 前端开发的兴起(尤其是 TypeScript、Babel 等工具的流行),这个词在21世纪初被广泛使用。它强调的是"同层级转换"——即源代码到源代码的翻译过程,而非传统编译中从高级语言到低级语言的转换。

相关词汇 Related Words

文学与技术作品引用 Literary & Technical References

  • Douglas Crockford 的 JavaScript: The Good Parts 中讨论了 JavaScript 作为目标语言接收其他语言转译输出的趋势。
  • Axel Rauschmayer 的 Speaking JavaScriptExploring ES6 中多次提及 transpile 的概念,尤其是在讨论 Babel 将 ES6+ 代码转译为 ES5 的过程中。
  • Microsoft 的 TypeScript Handbook 官方文档中将 TypeScript 到 JavaScript 的过程明确描述为 transpilation。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5470 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 7ms · UTC 09:33 · PVG 17:33 · LAX 02:33 · JFK 05:33
♥ Do have faith in what you're doing.