File tree Expand file tree Collapse file tree 1 file changed +104
-0
lines changed Expand file tree Collapse file tree 1 file changed +104
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ title : Types and Programming Languages
3+ date : 2025-10-27
4+ tags :
5+ - programming_language_theory
6+ ---
7+
8+ ## Preface
9+
10+ ### Goals
11+
12+ - 覆盖核心概念
13+ - 使用主义
14+ - 包含多种领域
15+ - 易于使用
16+ - 诚实。
17+
18+ ### Structure
19+
20+ 类型系统和逻辑的连接。
21+
22+ ### Required Background
23+
24+ ref: Essentials of Programming Languages by Friedman, Wand, and Haynes (2001)
25+
26+ ref: Programming Language Pragmatics by Scott (1999)
27+
28+ ref: The Functional Approach to Programming by Cousineau and Mauny
29+
30+ ### Course Outlines
31+
32+ ref: Communicating and Mobile Systems: the Pi-Calculus Milner Robin
33+
34+ ### Exercises
35+
36+ ### Typographic Conventions
37+
38+ ### Electronic Resources
39+
40+ ref:[ book's website] ( http://www.cis.upenn.edu/~bcpierce/tapl )
41+
42+ ### Acknowledgments
43+
44+ ## Introduction
45+
46+ ### Types in Computer Science
47+
48+ 类型系统是一种轻量的形式方法。
49+
50+ A type system is a tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute.
51+
52+ 类型系统最先在数学理论中出现。
53+
54+ 计算机对类型系统的研究分为实践派和理论派。
55+
56+ 类型系统是对运行时值的一种近似。
57+
58+ 静态类型和动态类型。
59+
60+ 静态类型检查是保守的,会拒绝一些实际上能正常运行的程序的。类型系统研究的主要目的就是允许更多的程序被类型化,也就是让类型系统拥有更强的表达能力。
61+
62+ 类型系统只能判断一部分问题,另一些问题只能留到运行时进行检查。
63+
64+ 这些可以被处理的问题是` run-time type errors ` ,不同的语言,不同的类型系统能够处理的运行时类型错误都不同。
65+
66+ 类型检查器是编译器的一部分。程序员可以添加类型注解,这样类型检查器就变成了一个证明检查器。
67+
68+ ### What Type Systems Are Good For
69+
70+ #### Detecting Errors
71+
72+ 静态类型检查的优点是允许提前检查一些编程报错。除了一些简单的错误,还有一些复杂的类型错误,这些能力取决于类型系统本身的表达能力。
73+
74+ 有力的类型系统会提供多种技巧来将结构的信息编码进类型的。
75+
76+ #### Abstraction
77+
78+ 分类接口和实现。
79+
80+ #### Documentation
81+
82+ 类型及接口可以成为一种文档。
83+
84+ #### Language Safety
85+
86+ 安全语言是一个有争议的概念,不同语言社区对它的理解都不同。
87+
88+ 静态类型安全和安全语言两者不相关。静态类型语言的安全也需要通过动态检查来达成。
89+
90+ #### Efficiency
91+
92+ 静态类型可以避免动态类型检查。
93+
94+ #### Further Applications
95+
96+ 计算机和网络安全。
97+
98+ 类型推断技术可以用于其他领域。
99+
100+ 自动理论证明。
101+
102+ 数据库。
103+
104+ 计算语言学。
You can’t perform that action at this time.
0 commit comments