Flavors of Lisp/Functional Programming

Started by
2 comments, last by rnlf_in_space 11 years, 7 months ago
Hello everyone!

I'm back here for a slightly different question.

Recently while working extensively with Java and C++ at school, I've had an increase in programming curiosity and desire to just sit down and try things not necessarily related to games or school project. I've been interested in functional programming for awhile, however I seem to have run into a snag.

LIsp:

I own Land of Lisp and really enjoy it however, using the GNU CLISP editor the book tells you to get, I am unable to save any work, or work how I would normally work at a regular IDE like Eclipse for Java or CodeBlocks for C++. I understand that the main feature here is that it is a REPL but I am just utterly confused how to go about it since I have no prior experience with an editing environment such as this. I also borrowed Practical Common Lisp from my library, and have the website bookmarked as well. It instructs me to use Emacs, which would be fine and dandy as it's supposed to solve my dilemma, however I'd be damned to understand anything about that editor. I understand it is meant to function a lot better under a Linux OS but I am still shackled to WIndows.

So my question here is:

How can I actually code in Lisp?

Which launches me into my second, and branching questions:

Which flavor of Lisp should I learn?

Should I even bother with Lisp, or should I go with another functional programming language?

I have other questions on this topic but I'll hold them for now as they might be answered.
Advertisement
You may use any editor you want and launch Lisp from the command line. If you should bother to learn Lisp depends mostly on your personal taste. I know a few people who are big Lisp advocates, but the language itself is a bit dated and hard to type (in terms of numbers of characters, especially parentheses) in my opinion. Using one of the newer functional languages like Haskell or Erlang (or even Scheme, even though it's older and a Lisp derivate) will give you the benefits of 30+ additional years of language and compiler theory.
Can you explain a little bit more on that? Mainly what I want to do is work on text parsing and some AI as a side thing apart from my school work. I'm really interested to see if I can write a program that can then write another program. I don't even know if that's even feasible but I really prefer the syntax I saw with Lisp(though you're right the parentheses are a total pain in the rear). I'm also really interested in cellular automata, and I saw an interesting example in the Land of Lisp book I was working with.
To do text parsing, functional languages as a whole are quite "the thing". I guess most of them have a parser library included (like Parsec) for Haskell. And to write a program, that writes another program is also possible in every programming language, I don't see functional languages having a big advantage in these areas. Some Lisp programs were written to modify themselfs while running, but from a debugging point of view, this may make things difficult as well. None of your interests has any language that might fit better than another one. You can research all of your interests using any functional language you like with more or less the same effort.

Haskell is 34 years younger than Lisp, it has a strong type system, pure (side effect free) functional semantics, lots of nice mathematical concepts in it (and it has a nicer syntax). On the other hand, because it is a pure functional language, it is harder to learn in some areas (input and output for example require a few hours of thinking and reading, before you can comfortably work with them).

I would reccomend you get your hands on a few of the languages you might find interesting, install a compiler or interpreter and fool around for a while. You will soon see which languages "feels" best for you.

This topic is closed to new replies.

Advertisement