现实世界的LISP:Clojure语言初探

Clojure由于兼具Lisp高效、可扩展的特性,同时又能利用Java的生态圈,在短时间内得到广泛传播。本文介绍了Clojure的基本配置和语法,并总结了作者在实际项目中使用Clojure的亲身体会。

我在学生时代最喜欢两门程序设计语言:Scheme和Haskell。Scheme的简洁灵活和Haskell的纯函数世界都给我留下了 深刻印象,因此一直希望能用这样的语言做一些实际工作。了解到Clojure之后,欣喜地发现它结合了LISP和函数式语言的优点,同时又拥有JVM成熟 的生态圈,虽然年轻,但可以立即在实际项目中应用。


现实世界的LISP:Clojure语言初探:   http://www.csdn.net/article/2013-04-17/2814930
更多阅读请访问程序员官网新首页:http://programmer.csdn.net/







阅读更多

Clojure vs 其他 lisp 语言(关闭)

05-15

rnrn The intent of my question is not to start a flame war, but rather to determine in what circumstances each language is "the best tool for the job."nn I have read several books on Clojure (Programming Clojure, Practical Clojure, The Joy of Clojure, and the Manning Early Access edition of Clojure in Action), and I think it is a fantastic language. I am currently reading Let Over Lambda which mostly deals with Common Lisp macros, and, it too, is a very interesting language.nn I am not a Lisp expert (more of a newbie), but this family of languages fascinates me, as does functional programming, in general.nn Advantages of Clojure (and disadvantages of "others"):nn n Runs on the JVM.nn n The JVM is a very stable, high-performance language environment that pretty well meets Sun's dream of "Write once, run [almost] anywhere". I can write code on my Macbook Pro, compile it into an executable JAR file, and then run it on Linux and Microsoft Windows with little additional testing.n The (Hotspot, and other) JVM supports high-quality garbage collection and very performant just-in-time compilation and optimization. Where just a few years ago, I wrote everything that had to run fast in C, now I do not hesitate to do so in Java.n Standard, simple, multithreading model. Does Common Lisp have a standard multithreading package?n Breaks up the monotony of all those parentheses with [], , and #, although Common Lisp experts will probably tell me that with reader macros, you can add those to CL.nnnn Disadvantages of Clojure:nn n Runs on the JVM.nn n No tail recursion or continuations. Does Common Lisp support continuations? Scheme requires support for both, I believe.nnnn Advantages of Others (Common Lisp, in particular) (and disadvantages of Clojure):nn n User-definable reader macros.n Other advantages?nnn Thoughts? Other differences?n n 转载于:https://stackoverflow.com/questions/6008313/clojure-vs-other-lisps

没有更多推荐了,返回首页