On Learning Lisp

cyocum on 2007-12-17T14:37:00

Lisp as always been one of those languages which causes many strong emotions, love or loathing. For me, it has always been one of those mythical languages which only exceptionally smart people use (either in academic computer science or elsewhere). I have tried a couple of times to learn the language but I finally found a book (Practical Common Lisp) that explains it in a way that I can understand it.

One of the most hated thing about Lisp is the use of parentheses for delimiting constructs and a complete lack of syntax. On the other hand, the use of macros (both reader macros and normal macros) allows for completely redefining the language at runtime.

I found that the human mind is a very flexible thing if given the chance. The use of parentheses , while a first intimidating, is only a hindrance if you allow it to be (or if you are looking for a reason not to use Lisp) as you continue using the language the parentheses tend to fade into the background as you marshal your functions into the right forms.

While I am still learning the language (I am doing toy-like programming, like reading the riff-header from wav files and writing small macros to work with CLOS), I still have much to learn about functional programming and the Lisp/Scheme style of programming in general. This does not mean that I will be giving up Perl any time soon but I hope it will teach me a few new tricks that I can use in other programming situations.


Structure as Syntax

phaylon on 2007-12-17T15:55:40

My first A-Ha moment with scheme was when I started to grasp that in S-Expr languages, structure replaces syntax. Now, a few months into it, it feels easier and saner than everything I've ever touched before.