Abstraction in Java and Lisp
13 Oct 2004 Making abstraction of detail is the key technique in developing software. Programming languages provide different mechanisms to accomplish this. Here are some thoughts about the differences between Java and Lisp. I do not want to talk about which language is better, I just want to talk about the different approach in each language in order to gain a deeper understanding of programming concepts.In Lisp you can make abstraction of everything. Values, functions, you name it. Classes are not directly supported by the language, but you can add these concepts to the language. There are some standard definitions (CLOS for Lisp).
In Java you can make abstraction of predefined concepts. You have classes to make abstraction of data-procedures. You can have methods to make abstraction of procedures. But you can't for example take a method of a class and put this in a list. Whereas in lisp, this is the normal way of working. To be fair, you could do it using introspection, but the whole operation would become very tedious. A sign of this fact is the growing popularity of "aspects" in Java. In Lisp "aspects" could be expressed in the language itself (just as object orientation is expressed in the language itself).
When you would only consider the languages, Lisp is the more flexible one to express different kinds of abstraction. You can even add new kinds of abstraction (e.g. "aspects" ). Java will be easier to understand because the ways to abstract concepts are more standard, so you know how to interpret parts of a program without having to consider the meta structure of Java (because it is built-in).