What could be the fastest and least painful way to learn LISP for a C developer?
I have been working as a C developer on Linux platform for sometime now. Recently finished K & R and did a little study of implementing OOP in C. Beside that I have studied C++ and Java. All of it has been on Linux platform.
Now I plan to learn LISP. I have gone through LISP discussions directed towards beginners on SO, especially What’s the best way to learn LISP.
I understand, moving from procedural to functional programming paradigm is a big move. Thinking in terms of the new paradigm would be the real challenge. Just like the way it was when I learned OOP for the first time.
It is the paradigm I am really worried about. When I started OOP, most of the time was consumed in learning how to view problems in terms of OOP. Syntax was not so difficult to grasp.
Now as I have been working in C, my current projects at my workplace are also in C. I am concerned how could I learn to view problems in terms of functional programming.
- What could be the best way to make shift towards LISP for a C developer?
- Should I learn some other intermediate language before I move to LISP?
- If yes then which language that could be?
- Any particular text that would help me think in the way of functional programming?
- Any suggestion that would make this shift faster and easier? 开发者_如何学JAVA
Thanks for your time. Any help and suggestion would be greatly appreciated.
Try the books:
Practical Common Lisp by Peter Siebel (available online at http://www.gigamonkeys.com/book/ ).
ANSI Common Lisp by Paul Graham then try On Lisp by the same author.
Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp by Peter Norvig
Other places to find help include the #lisp channel on FreeNode and LispForum ( http://www.lispforum.com/ ).
Of these PCL is probably the easiest to get into, if you're trying to learn Lisp as a way of learning Functional Programming you're going to be disappointed though, you can use Lisp to do FP but it isn't strictly a FP language.
Possible duplicate
You could do a lot worse than MIT Course 6.001 "Structure and Interpretation of Computer Programs". The class uses Abelson & Sussman's text; see also the book's main site for more information.
The class uses Scheme, a dialect of LISP which is significantly cleaner and easier to use than Common LISP (yes, this is an opinion, deal with it). Switching to Common LISP won't be that difficult later. Paul Graham's On LISP is a "take no prisoners" text on programming in Common LISP. His ANSI Common LISP is a gentler introduction to the subject.
Now for the bad news. Making the shift toward WORKING in LISP is likely to be very difficult, as there are a lot more C/C++ and Java jobs out there.
I'd recommend jumping straight into learning LISP. It isn't that difficult.
You'll need a LISP system to play with. If you are using Scheme, it is hard to beat the MIT/GNU Scheme system. For Common LISP, there are several choices: I'd probably start with GCL - GNU Common LISP. Versions are available for Linux and Windows.
The book I originally learnt lisp with is The Little Schemer by DP Friedman. Really gets your head into a functional programming mindset.
Read "Practical Common Lisp". At my company we have at least 70 programmers using Common Lisp every day for complex, practical programs (airline fare search, airline reservation systems), and when a new programmer shows up who is not familiar with Lisp, we just hand him or her a copy of "Practical Common Lisp". I cannot say enough about how great this book is.
I found python foundation (lambda functions and such) to be very helpful in grasping lisp.
At one time I decided to learn emacs scripting, which uses lisp dialect, and that was very helpful, since then you know you want what to do, instead of going through exercises.
I think you need a good text editor with lisp support and shell. then just try to make a target project and implement it.
I personally found the GNU Emacs Lisp Tutorial a delight to read. It will give you the general ideas.
I recommend first reading Successful Lisp up to chapter 3, don't go on and read chapter 4. 3 get's a good grasp of Lisp thinking, however. Then read Gentle, and after that, Practical Common Lisp. From there, just general Common Lisp experimentation will help you on from there.
I recently bought Land of Lisp, and found it to be quite entertaining and educational. I can recommend it.
精彩评论