title: Can anyone explain the design decisions behind Autolisp/visual lisp to me?
body: <p>I wonder can anyone explain the design rationale behind the following features of autolisp / visual lisp?  To me they seem to fly in the face of accepted software practice ... am I missing something?</p>
  
  <ul>
  <li>All variables are global by default (ie unless placed after a <code>/</code> in the function arguments)</li>
  <li>Reading/writing data from autocad requires putting stuff into an association list with lots of magic numbers.  <code>10</code> means x/y coordinates, <code>90</code> means length of the coordinate list, <code>63</code> means colour, etc.  Ok you could store these in some constants but that would mean yet more globals, and the documentation encourages you to use the magic numbers directly.</li>
  <li>Lisp is a functional-style language, which encourages programming by recursion over iteration, but tail recursion is afaik not optimised in visual lisp leading to horrendous call stacks - unless, of course you iterate.  But loop syntax is very restrictive; e.g. you can't break out of or return a value from a loop unless you put some kind of flag in the termination condition.  Result, ugly code.</li>
  <li>Generally you are forced to declare variables all over the place which flies in the face of functional programming - so why use a functional(-ish) language?</li>
  </ul>