In Lisp, everything is made of what?
Did you ever hear that in Lisp, everything is a list? This is the first phrase that I've heard describing this language. This simplistic explanation, as it is often repeated in isolation and without a single further comment, has got in the way of my learning this greatest language. I thought then, what a retarded language - only lists and nothing else? How primitive! How on Earth can you represent anything with a shopping list? Okay, you can probably program a shopping routine and emulate queues of buyers in the mall, but you certainly cannot do graphics or something more complex than that. Too specialized language, I thought, not worth my attention, and learned C++ ...
After reading Paul Graham, I went - hey, I may be really missing something here. What is this thing 'Lisp macros', anyway? How can they be that powerful? I've got to look into it. And so I started to study Lisp...
After first few pages of Lisp manual, the ultimate revelation downed upon me: it's not just lists, it's lists within lists within lists within lists! We get trees of lists. In Lisp everything is a tree! Lists have one dimension, trees have as many as you want! They can grow to infinity and fill all space around you. They can take the form of any object in the physical universe. With trees you can connect any concept with any other. Everything is made of trees, how wonderful! Basically, any structure of data can be represented with Lisp's TREES. Lists, linked lists, double linked lists, matrices, b-trees, red-black trees, classes, collections, database entries, xml schemas, et cetera, et cetera, et cetera - any data structure you have in any application can be quite easily and simply represented with some tree. This was already the turning point, and I didn't get to the macros yet.
So, in telling others about Lisp's wonders, don't tell them that in Lisp, everything is made of lists. This is misleading. Instead, tell them that everything is made of trees - lists of lists of lists, and with that, anything a programmer wants, can be made.
Did you ever hear that in Lisp, everything is a list? This is the first phrase that I've heard describing this language. This simplistic explanation, as it is often repeated in isolation and without a single further comment, has got in the way of my learning this greatest language. I thought then, what a retarded language - only lists and nothing else? How primitive! How on Earth can you represent anything with a shopping list? Okay, you can probably program a shopping routine and emulate queues of buyers in the mall, but you certainly cannot do graphics or something more complex than that. Too specialized language, I thought, not worth my attention, and learned C++ ...
After reading Paul Graham, I went - hey, I may be really missing something here. What is this thing 'Lisp macros', anyway? How can they be that powerful? I've got to look into it. And so I started to study Lisp...
After first few pages of Lisp manual, the ultimate revelation downed upon me: it's not just lists, it's lists within lists within lists within lists! We get trees of lists. In Lisp everything is a tree! Lists have one dimension, trees have as many as you want! They can grow to infinity and fill all space around you. They can take the form of any object in the physical universe. With trees you can connect any concept with any other. Everything is made of trees, how wonderful! Basically, any structure of data can be represented with Lisp's TREES. Lists, linked lists, double linked lists, matrices, b-trees, red-black trees, classes, collections, database entries, xml schemas, et cetera, et cetera, et cetera - any data structure you have in any application can be quite easily and simply represented with some tree. This was already the turning point, and I didn't get to the macros yet.
So, in telling others about Lisp's wonders, don't tell them that in Lisp, everything is made of lists. This is misleading. Instead, tell them that everything is made of trees - lists of lists of lists, and with that, anything a programmer wants, can be made.
