Programming languages, translators and IDEs · 编程语言、翻译器和IDE
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| translator/trænˈsleɪtə/ | 翻译程序 | fān yì chéng xù |
| programming language/ˈprəʊɡræmɪŋ ˈlæŋɡwɪdʒ/ | 编程语言 | biān chéng yǔ yán |
| machine code/məˈʃiːn kəʊd/ | 机器码 | jī qì mǎ |
| high-level language/haɪ ˈlevl ˈlæŋɡwɪdʒ/ | 高级语言 | gāo jí yǔ yán |
| low-level language/ləʊ ˈlevl ˈlæŋɡwɪdʒ/ | 低级语言 | dī jí yǔ yán |
| assembly language/əˈsemblɪ ˈlæŋɡwɪdʒ/ | 汇编语言 | huì biān yǔ yán |
| compiler/kəmˈpaɪlə/ | 编译器 | biān yì qì |
| interpreter/ɪnˈtɜːprɪtə/ | 解释器 | jiě shì qì |
| integrated development environment/ˈɪntɪɡreɪtɪd dɪˈveləpmənt enˈvaɪrənmənt/ | 集成开发环境 | jí chéng kāi fā huán jìng |
Languages and translators 翻译程序
- People write programs in a programming language 编程语言; the CPU runs machine code 机器码.
- Languages are high-level or low-level.
- A translator converts a program to machine code — and an IDE helps you write it.
语言与翻译器
- 人们用一种编程语言(programming language)写程序;CPU 运行机器码(machine code)。
- 语言是高级的或低级的。
- 一个翻译器(translator)把一个程序转换成机器码——而一个 IDE 帮你写它。
Computing concept lab · 计算概念实验
Classify concrete examples by the computing idea they demonstrate. · 根据它们所演示的计算概念对具体示例进行分类。
High-level vs low-level
- A high-level language 高级语言 (e.g. Python) reads like English — easy to write/fix and portable (runs on different computers).
- A low-level language 低级语言 is close to the hardware: machine code (binary, run directly by the CPU) and assembly language 汇编语言 (mnemonics for machine code).
- Low-level code is CPU-specific — used when you need full hardware control or very fast, small code.
High-level languages are close to human language and portable; low-level languages (assembly and machine code) are close to the hardware and tied to one CPU
A compiler 编译器 translates the whole program once into machine code; an interpreter 解释器 translates and runs one line at a time.
高级对低级
- 一种高级语言(high-level language,例如 Python)读起来像英语——容易写/修复且可移植(在不同的计算机上运行)。
- 一种低级语言(low-level language)接近硬件:机器码(二进制,由 CPU 直接运行)和汇编语言(assembly language,机器码的助记符)。
- 低级代码是CPU 特定的——在你需要完全的硬件控制或非常快、小的代码时使用。

高级语言接近人类语言且可移植;低级语言(汇编和机器码)接近硬件并绑定到一个 CPU

一个编译器一次把整个程序翻译成机器码;一个解释器一次翻译并运行一行。
A high-level language (like Python): · 高级语言(如Python):
High-level languages are easy to read/write and portable; low-level languages are CPU-specific. · 高级语言易于读写且具有可移植性;低级语言针对特定CPU设计。
Compiler vs interpreter
| Compiler | Interpreter | |
|---|---|---|
| Translates | the whole program at once | one line at a time |
| Errors | all reported at the end | stops at the first error |
| Finished program | runs fast, no translator needed | slower, needs the interpreter |
- Use a compiler to share a fast finished program; an interpreter while writing and testing.
An operating system is software — the programs that tell the hardware what to do.
编译器对解释器
| 编译器 | 解释器 | |
|---|---|---|
| 翻译 | 一次整个程序 | 一次一行 |
| 错误 | 全部在最后报告 | 在第一个错误处停止 |
| 完成的程序 | 运行快,不需要翻译器 | 更慢,需要解释器 |
- 使用一个编译器来分享一个快速的完成的程序;在写和测试时使用一个解释器。

一个操作系统是软件——告诉硬件做什么的程序。
Match each term to what it is. · 将每个术语与其含义匹配。
High-level → readable; machine code → binary; a compiler translates once, an interpreter goes line by line. · 高级语言→可读性强;机器代码→二进制形式;编译器一次性翻译,解释器逐行执行。
A compiler: · 编译器:
A compiler translates everything once into a fast stand-alone program; an interpreter goes line by line. · 编译器一次性将所有内容翻译为快速的独立程序;解释器逐行执行。
A compiler translates the whole program once so it then runs fast without the compiler, whereas an interpreter translates and runs line by line, stopping at the first error — handy while testing. · 编译器一次性翻译整个程序,之后无需编译器即可快速运行;而解释器逐行翻译并执行,遇错即停——便于调试。
Compiled code is faster and stand-alone; interpreted code is easier to debug because it stops where the error is. · 编译后的代码运行更快且为独立程序;解释型代码更易调试,因为它会在错误处停止。
Integrated development environment 集成开发环境 (IDE)
- An IDE puts the tools to write programs in one place:
- a code editor, a run-time environment, a translator, error diagnostics, auto-completion/correction, and prettyprinting (neat colour + indentation).
Hardware is the physical parts; software is the programs
集成开发环境(IDE)
- 一个 IDE 把写程序的工具放在一个地方:
- 一个代码编辑器、一个运行时环境、一个翻译器、错误诊断、自动完成/纠正,和美化打印(prettyprinting,整洁的颜色 + 缩进)。
Which is a feature of an IDE? · 哪一项是IDE的特征?
An IDE bundles an editor, translator, run-time, diagnostics, auto-complete and prettyprinting. · 集成开发环境(IDE)将编辑器、翻译器、运行时、诊断工具、自动补全和格式化功能整合在一起。
You've got it
- high-level = English-like, portable; low-level = machine code (binary) / assembly, CPU-specific
- a translator turns code into machine code; compiler (whole program at once) vs interpreter (line by line)
- compiler → fast finished program; interpreter → easy testing
- an IDE bundles editor, translator, diagnostics, auto-complete and prettyprinting
你掌握了
- 高级 = 像英语,可移植;低级 = 机器码(二进制)/ 汇编,CPU 特定
- 一个翻译器把代码变成机器码;编译器(一次整个程序)对解释器(逐行)
- 编译器 → 快速的完成的程序;解释器 → 容易测试
- 一个 IDE 捆绑编辑器、翻译器、诊断、自动完成和美化打印