TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Advice to newbie on learning Lisp/Clojure

70 点作者 cwb超过 14 年前

6 条评论

mduerksen超过 14 年前
The author seems to think that Clojure has some conceptional complexity to it that is easier to overcome by doing a intermediate step with Racket. But in which way is Racket or any other Lisp an intermediate step?<p>I had no Lisp experience whatsoever before I started with Clojure, and the only real difficulties I experienced were (in descending order):<p>a) translating my imperative-style thinking into functional style - this would happen to me in Racket as well.<p>b) macros - but you don't need to grasp macros as a beginner, that's a topic by itself anymay.<p>(and NO, the bracket syntax was no problem at all)<p>YMMV if you have an other background. It is true: The more programming languages you already know, the easier it will be to learn a new one (iff it doesn't conceptionally diverge too much). But if you don't have that background, why not learn the desired language right away?
评论 #2257547 未加载
评论 #2257813 未加载
评论 #2257552 未加载
Kototama超过 14 年前
I don't agree with the suggestion as I fear that beginning with SICP could just demotivates a beginner and that early positive feedbacks (related to the goal to achieve) are important.<p>While Scheme is conceptually simpler than Clojure, Clojure remains relatively simple in its conception. Here is what makes it a little more complex:<p>- one needs to know a bit of Java to really use it fully. The integration with Java is so nice that it's not rare to see direct calls to Java APIs without using wrappers, for instance when there is no Clojure library to do the job.<p>- one needs to understand the different ways of dealing with concurrency and learn to choose the appropriate one for a given problem.<p>- one needs to understand how protocols work, when they are needed and when multimethods are prefered. This also implies understanding the differences between deftype, defstruct and defrecord.<p>That said, it remains relatively simple because you only have to deal with functions, macros and namespaces and all is rather uniform.<p>Here is what I would suggest to begin with Clojure:<p>- if you have some Lisp background just pick a book like Programming Clojure (short, nice to read and direct to the point) or Practical Clojure (also short and up to date regarding protocols)<p>- if you have some Java or OO background but don't find confident enough with a Lisp syntax read the first chapters of Practical Common Lisp and then one of the other books mentioned above. <a href="http://www.gigamonkeys.com/book/" rel="nofollow">http://www.gigamonkeys.com/book/</a> This book explains really clearly the why of the Lisp syntax and also macros (better than Programming Clojure on this point but this is mostly due, I guess, to the fact that Programming Clojure is more concise).
评论 #2258029 未加载
JSig超过 14 年前
This is the approach I took when learning Clojure. I started diving into the language and then stopped everything to learn Scheme. It was painful because I really wanted to be doing Clojure. When I finally got back to Clojure I think that it helped out a ton. Cons, car and cdr oh my!<p>I believe that doing what I did is not necessary to get started with Clojure. It seems like the choice between top-down and bottom-up design. If you choose Clojure first, you will learn concepts that will help if you should ever approach scheme.<p>This thread from the Clojure Google group may be of some interest: Thinking in Clojure<p><a href="https://groups.google.com/d/topic/clojure/9JufDYgE8DQ/overview" rel="nofollow">https://groups.google.com/d/topic/clojure/9JufDYgE8DQ/overvi...</a>
badmash69超过 14 年前
Can I not defer paying homage to the LISP cult until I achieve a fair amount of productivity in Clojure ?<p>I am learning Clojure as I work through "Clojure in Action".(Thanks to Manning's promotions-- I also have the "Joy of Clojure" ebook but I haven't opened that one yet). My complaint is that there are not enough exercises in Clojure for beginners. I recall the K&#38;R C book -- it had exercises at the end of every chapter which were very useful. Those exercises are the reason why I can still dive in C with no fear whatsoever .<p>I understand Clojure's relationship to LISP ; but that doesn't have to mean that Clojure can't have its own set of programming exercises and blogs for the beginners.<p>But posts like OP are not helpful for beginners. And they are not helpful to Clojure ecosystem as they scare away causal learners.
kenjackson超过 14 年前
I'm not sure going down the Scheme-&#62;List-&#62;Clojure path is the right way to go. First, I don't really know Clojure. But I do think Scheme to Lisp was more painful for me than I think it should have been. I also learned Scheme from SICP, but going to Lisp it seems like I tripped over every little thing.<p>Things like funcall had me banging my head -- as I didn't even realize that it was something that should be different.<p>If your goal is to learn Lisp, I'd just go straight to Lisp.<p>Again, I don't know Clojure, so I don't know if learning Lisp first is really necessary, but if it is, then skip Scheme.<p>Also, don't do all the exercises in SICP unless you feel like doing so. Some require domain knowledge that you frankly just don't need if your desire to learn these languages is web dev.<p>Someone needs to do a SICP: The Web Dev Edition
评论 #2262502 未加载
评论 #2259036 未加载
freddealmeida超过 14 年前
sorry why does lisp have anything to do with clojure?
评论 #2257542 未加载
评论 #2257523 未加载