比较语言的好参考?
我熟悉几种计算机语言(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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您喜欢通过示例学习,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?").
这本免费电子书可能比您正在寻找的内容重一些,但很全面:
编程语言实用基础 (pdf 1.5Mb)
以下是目录摘录:
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: