Common Lisp vs Java

I’ve been sort of wanting to learn LISP for long time (~ 10 years). Now finally I got some chance to try that out. I’ve started reading On Lisp by Paul Graham along with Practical Common Lisp by Peter Seibel. I find them pretty invaluable in learning Lisp.

It has been nearly 9 years since I’ve started learning Java, during my programming adventures, I’ve used COBOL, Perl and Ruby. But never got to build a complete application purely using functional programming. Partly inspired by on The Reinvigorated Programmer, I start my journey of learning Common Lisp.

I’m trying to compare how I do things in Java with the exercises/programs I write while learning Lisp. Here’s the first installment:

The following Common Lisp created a database of CDs with some data, and provides methods to store the database to a file and load the same from the file.

First the Common Lisp program:

And here’s the Java version (without saving and reading from file).

Database.java

CompactDisc.java

Main.java

This is not one-to-one comparison between Common Lisp version and Java version, this is just part of my note taking while learning LISP and wrap my head around a new language.

21 thoughts on “Common Lisp vs Java”

  1. Vijay, I am delighted and humbled that my own noodlings have been some small part of pushing you over the edge into learning Lisp. Hopefully I will start to catch up with you soon :-)

  2. Vijay, I am delighted and humbled that my own noodlings have been some small part of pushing you over the edge into learning Lisp. Hopefully I will start to catch up with you soon :-)

  3. Vijay, I am delighted and humbled that my own noodlings have been some small part of pushing you over the edge into learning Lisp. Hopefully I will start to catch up with you soon :-)

  4. Vijay, I am delighted and humbled that my own noodlings have been some small part of pushing you over the edge into learning Lisp. Hopefully I will start to catch up with you soon :-)

Leave a Reply