Sign in to follow this  
KittyPlaysViolin

Flavors of Lisp/Functional Programming

Recommended Posts

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.

[b][u]LIsp:[/u][/b]

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:

[b]How can I actually code in Lisp?[/b]

Which launches me into my second, and branching questions:

[b]Which flavor of Lisp should I learn?[/b]

[b]Should I even bother with Lisp, or should I go with another functional programming language?[/b]

I have other questions on this topic but I'll hold them for now as they might be answered.

Share this post


Link to post
Share on other sites
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. Edited by rnlf

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this