Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

  1. What could be the best way to make shift towards LISP for a C developer?
  2. Should I learn some other intermediate language before I move to LISP?
  3. If yes then which language that could be?
  4. Any particular text that would help me think in the way of functional programming?
  5. Any suggestion that would make this shift faster and easier?

Thanks for your time. Any help and suggestion would be greatly appreciated.

like image 792
Andrew-Dufresne Avatar asked Aug 20 '10 06:08

Andrew-Dufresne


2 Answers

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.

like image 178
Amos Avatar answered Oct 12 '22 23:10

Amos


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.

like image 38
John R. Strohm Avatar answered Oct 13 '22 00:10

John R. Strohm