比较语言的好参考?

发布于 2024-12-07 21:24:57 字数 214 浏览 0 评论 0原文

我熟悉几种计算机语言(Java、C、C++、Python、Scheme、Javascript),但对分析和比较它们的术语知之甚少(例如动态/静态绑定、动态/静态类型、传递-值与引用传递、闭包、运算符重载等)。

是否有一本白皮书或易于阅读的书足够深入地讨论这些主题,使我能够看到一种不熟悉的计算机语言并对自己说,“哦,它有动态绑定和静态类型”,并说“这与 C++ 不同,因为……但又相似,因为……”?

I'm familiar with several computer languages (Java, C, C++, Python, Scheme, Javascript) but am only vaguely with the terminology for analyzing and comparing them (things like dynamic/static binding, dynamic/static types, pass-by-value vs. pass-by-reference, closures, operator overloading, etc.).

Is there a whitepaper or easily-readable-book that discusses these topics in enough depth for me to be able to look at an unfamiliar computer language and say to myself, "Oh, it has dynamic binding and static types", and to say "That's different from C++ because ... but similar because ..."?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

末が日狂欢 2024-12-14 21:24:57

如果您喜欢通过示例学习,Rosetta 代码 是一个很好的资源。它的语言比较表可能是一个不错的起点。

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

If you like learning by example, Rosetta Code is a great resource. Its Language Comparison Table might be a good place to start.

I've found it helpful both for theoretical comparisons ("How do C++ and Java's respective exception handling systems differ?") and for practical work ("I know how to do a foreach() in PHP; what's the syntax for the equivalent operation in PERL?").

自由如风 2024-12-14 21:24:57

这本免费电子书可能比您正在寻找的内容重一些,但很全面:

编程语言实用基础 (pdf 1.5Mb)

以下是目录摘录:

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 

This free ebook may be somewhat heavier than what you are looking for, but is comprehensive:

Practical Foundations for Programming Languages (pdf 1.5Mb)

Here is an extract of the 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 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文