Go 语言的血脉图表
这张图展示 Go 语言的起源和它影响到的语言。
mermaid
graph TB
A[BCPL] --> B[B]
B --> C[C]
C --> D[Unix]
C --> E[Pascal]
D --> F[C++]
E --> G[Modula]
F --> H[AWK]
G --> I[Oberon]
H --> J[Perl]
I --> K[Limbo]
J --> L[Python]
K --> M[Newsqueak]
M --> N[Alef]
N --> O[Plan 9]
O --> P[Go]
L --> Q[Java]
Q --> R[C#]
R --> S[Scala]
S --> P
H --> P
I --> P
J --> P
K --> P
style A fill:#f9f,stroke:#333,stroke-width:4px
style B fill:#f9f,stroke:#333,stroke-width:4px
style C fill:#f9f,stroke:#333,stroke-width:4px
style D fill:#f9f,stroke:#333,stroke-width:4px
style E fill:#f9f,stroke:#333,stroke-width:4px
style F fill:#f9f,stroke:#333,stroke-width:4px
style G fill:#f9f,stroke:#333,stroke-width:4px
style H fill:#f9f,stroke:#333,stroke-width:4px
style I fill:#f9f,stroke:#333,stroke-width:4px
style J fill:#f9f,stroke:#333,stroke-width:4px
style K fill:#f9f,stroke:#333,stroke-width:4px
style L fill:#f9f,stroke:#333,stroke-width:4px
style M fill:#f9f,stroke:#333,stroke-width:4px
style N fill:#f9f,stroke:#333,stroke-width:4px
style O fill:#f9f,stroke:#333,stroke-width:4px
style P fill:#0f0,stroke:#333,stroke-width:4px
style Q fill:#0ff,stroke:#333,stroke-width:4px
style R fill:#0ff,stroke:#333,stroke-width:4px
style S fill:#0ff,stroke:#333,stroke-width:4px读这张图可以按四块看:起源、演变、诞生和影响。
起源:
- BCPL、B、C 是 Go 语言的祖先语言,代表了早期的编程语言演变。
- Unix、Pascal 等系统和语言对 C 和 C++ 的发展有重要影响。
演变过程:
- C++、AWK、Modula 等语言在 C 的基础上发展。
- Perl 和 Python 等脚本语言简化了编程,提高了开发效率。
- Java 和 C# 引入了面向对象编程和垃圾回收机制。
- Squeak 和 Newsqueak 提供了并发编程的基础。
Go 语言的诞生:
- Go 吸收了这些语言的经验——C 系的语法、脚本语言的易用、并发模型、垃圾回收,做成一门语法简洁、内置并发支持的语言。
影响:
- Go 在云计算、容器化和微服务里用得很广:Docker、Kubernetes、gRPC、etcd、Prometheus 这些项目都是 Go 写的。