Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
Like this article? We recommend


Eric S. Raymond once said, "Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot." The defining feature of Lisp is the syntax—or, rather, the lack of syntax. When you compile any programming language, one of the first things your compiler will do is generate a syntax tree. In Lisp, you write the syntax tree yourself. As with Smalltalk, this approach gives you a great deal of flexibility. Your Lisp code is a simple data structure that the language is designed to process, meaning that you can easily write a Lisp program that takes a Lisp program and performs some translations on it.

Because this is such a useful thing to do, features built into the language make it easy. Lisp macros are very similar to functions, but they’re executed at compile time, allowing you to transform the syntax tree easily.

It’s often said that the correct way of writing code in Lisp is to write the problem and then write a domain-specific language that will compile the problem description. This is a very good habit to get into because, for a lot of classes of problem, something close to the domain-specific language already exists. Once you get used to the idea that each problem has a specific language in which it can be solved easily, you’ll be better at choosing the correct language for any task.

  • + Share This
  • 🔖 Save To Your Account