本文介绍了从初学者的角度来看,Clojure 是否更接近于 Scheme 或 Common Lisp?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想学习Clojure,我应该从学习Scheme还是Common Lisp开始?

If I want to learn Clojure, should I start by learning Scheme or Common Lisp?

还是 Clojure 与这两者有很大不同,以至于我应该自己开始学习 Clojure?

Or is Clojure different enough from both of these, that I should just start learning Clojure by itself?

推荐答案

学习这三者对您有好处,只要这样您就可以选择最适合您需要的一种.三者各有优缺点.

It would be to your benefit to learn all three, if only so you can pick which one is best for your needs. All three have their own strengths and weaknesses.

Clojure 有点像 Scheme,因为它是一种主要功能性的语言,并且是一种 Lisp1.Clojure 还从 Common Lisp 借用了一些东西,比如多方法和宏,人们总是将很酷的 Common Lisp 东西作为库移植到 Clojure.在编写 Clojure 之前,Clojure 的创建者本人就是一名 Common Lisp 黑客.Clojure 借鉴了 Scheme 和 CL 的大量术语和约定(但在许多领域也有自己的风格).

Clojure is vaguely like Scheme in that it's a mostly-functional language and is a Lisp1. Clojure also borrows things from Common Lisp, like multimethods and macros, and people are always porting cool Common Lisp things to Clojure as libraries. The creator of Clojure was himself a Common Lisp hacker before writing Clojure. Clojure borrows a lot of terminology and conventions from Scheme and CL both (but also has its own flavors in many areas).

现在关于 Clojure 的文献并不多,它是一种新语言(只有 目前一本 Clojure 书).但是有很多面向 Scheme 的优秀书籍,例如 SICP小阴谋家/经验丰富的阴谋家.还有一些不错的 CL 书籍,例如 PCL 等.

There is not a lot of literature for Clojure right now, it being such a new language (there is only one Clojure book so far). But there are loads of good Scheme-oriented books, like SICP and The Little Schemer / The Seasoned Schemer. There are also good CL books, like PCL, and many others.

Lisps 也有很多历史,了解历史,看看 Clojure 在哪里以及为什么偏离它,如果没有别的,对你有好处.

Lisps also have a lot of history and it is to your benefit to understand the history, to see where and why Clojure deviates from it if nothing else.

我建议从 Scheme 开始,因为它是三者中最简单的语言,因此最容易学习.然后涉足 CL 和 Clojure,直到你掌握了一些东西,然后全力以赴地研究你喜欢的两者中的任何一个.

I'd recommend starting with Scheme because it's the simplest language of the three and therefore easiest to learn. Then dabble in CL and Clojure until you have a handle on things, then go full-steam in whichever of the two you gravitate toward.

这篇关于从初学者的角度来看,Clojure 是否更接近于 Scheme 或 Common Lisp?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 04:53