比较语言的好参考?

时间:2011-09-30 19:12:19

标签: programming-languages language-comparisons

我熟悉几种计算机语言(Java,C,C ++,Python,Scheme,Javascript),但我只是模糊地分析和比较它们的术语(动态/静态绑定,动态/静态类型,传递等) -by-value与pass-by-reference,closures,operator overloading等。)。

是否有白皮书或易于阅读的书籍能够深入讨论这些主题,以便能够查看不熟悉的计算机语言并对自己说:“哦,它具有动态绑定和静态类型”,以及说“这与C ++有所不同,因为...但是相似,因为......”?

2 个答案:

答案 0 :(得分:4)

如果您喜欢通过示例学习,Rosetta Code是一个很好的资源。它的Language Comparison Table可能是一个很好的起点。

我发现它对于理论比较(“C ++和Java各自的异常处理系统有何不同?”)以及实际工作(“我知道如何在PHP中执行foreach())都有帮助;它的语法是什么PERL中的等效操作?“)。

答案 1 :(得分:2)

这本免费电子书可能比你想要的更重,但是很全面:

Practical Foundations for Programming Languages(pdf 1.5Mb)

以下是TOC的摘录:

I Judgements and Rules
1 Syntactic Objects 
2 Inductive Definitions 
3 Hypothetical and General Judgements 

II Levels of Syntax 
4 Concrete Syntax 
5 Abstract Syntax 

III Statics and Dynamics 
6 Statics 
7 Dynamics 
8 Type Safety 
9 Evaluation Dynamics 

IV Function Types 
10 Function Definitions and Values 
11 Godel’s System T 
12 Plotkin’s PCF 

V Finite Data Types 
13 Product Types 
14 Sum Types 
15 Pattern Matching 
16 Generic Programming 

VI Infinite Data Types 
17 Inductive and Co-Inductive Types 
18 Recursive Types 

VII Dynamic Types 
19 The Untyped l-Calculus 
20 Dynamic Typing 
21 Hybrid Typing 

VIII Variable Types 
22 Girard’s System F 
23 Abstract Types 
24 Constructors and Kinds 

IX Subtyping 
25 Subtyping 
26 Singleton Kinds 

X Classes and Meth
27 Dynamic Dispatch 
28 Inheritance 

XI Control Effects 
29 Control Stacks 
30 Exceptions 
31 Continuations 

XII Types and Propos
32 Constructive Logic 
33 Classical Logic 

XIII Symbols 
34 Symbols 
35 Fluid Binding 
36 Dynamic Classification 

XIV Storage Effects 
37 Modernized Algol 
38 Mutable Data Structures 

XV Laziness 
39 Lazy Evaluation 
40 Polarization 

XVI Parallelism 
41 Nested Parallelism 
42 Futures and Speculation 

XVII Concurrency 
43 Process Calculus 
45 Distributed Algol 

XVIII Modularity 
46 Components and Linking 
47 Type Abstractions and Type Classes 
48 Hierarchy and Parameterization 

XIX Equivalence 
49 Equational Reasoning
50 Equational Reasoning
51 Parametricity 
52 Process Equivalence 

XX Appendices 
A Mathematical Preliminaries