Monday, October 3, 2016

Enough with doing things in Autolisp. It is time for being things in Autolisp.

When people mention Autolisp automation they usually refer to custom macros used to reduce keystrokes. And to be fair, that is how I started with Autolisp. It was actually a very long -LAYER command to turn on and off drawing layers.

That was fine for a while until I started to realize that Autolisp functions are really like Lego blocks. They can fit together into amazing things. For years I was using Autolisp just that way. Do this. Do that. What programmers call programming procedurally. It was all about what the program will do. Now I am seeing there is another side. Programming declaratively. Be this. Be that. It is a different way of thinking. The idea is to list what is true in what I call a truth table, and then list the rules that govern how these true statements relate to each other. Then I can ask questions about the things that are true and the program will reason and hopefully give an answer. Or in my case draw a correct solution.