From: David Lewis
Subject: Autolisp from Autocad
Date: 
Message-ID: <pbd+Yc@engin.umich.edu>
  Not being an expert in either Autolisp or regular lisp I was curious
as to how similar the languages were.  I know autolisp (obviously)
has access to a lot of autocad commands.. but other than that.. from
what little I have seen.. they looked to be roughly the same..
I have written a few small programs in both languages.  Can anyone
give me some info on the diffs?


-- 

Internet: ······@ais.org

From: Gary Oberbrunner
Subject: Re: Autolisp from Autocad
Date: 
Message-ID: <GARYO.92Mar31175115@prometheus.think.com>
In article <······@engin.umich.edu> ······@engin.umich.edu (David Lewis) writes:

   Date: Sat, 28 Mar 92 01:38:18 EST
   Organization: University of Michigan Engineering, Ann Arbor

     Not being an expert in either Autolisp or regular lisp I was curious
   as to how similar the languages were.  I know autolisp (obviously) has
   access to a lot of autocad commands.. but other than that.. from what
   little I have seen.. they looked to be roughly the same..  I have
   written a few small programs in both languages.  Can anyone give me some
   info on the diffs?

   Internet: ······@ais.org

I have used regular lisp (Common Lisp) somewhat extensively, and I've
written a few thousand lines of AutoLisp, and I can tell you unequivocally
that AutoLisp is *not* a real lisp.

- No variable length argument lists (though built-in funcs can have them).
- No specifiable default arg values.
- No for or dotimes or loop or any decent looping construct (the *only*
  looping construct is (while ...)).
- No macros, so there's no way to extend it, or write loop constructs etc.
- No way to write a function that doesn't evaluate its args.
- No local variables except in function declaration.
- No arrays.
- No incf, decf, etc. and no way to write them.
- No advise/unadvise.
- Access to AutoCAD functions is clumsy at best, and at worst in some cases
  impossible (if you can't predict which prompts will come up, you can't
  make it work).
- No access to AutoCAD internals such as line intersection, pt-in-poly.
- No error handling (not even throw/catch).
- Very slow.
- No debugger (just stack trace with no line numbers, no local vars, etc.)
- etc...

In conclusion, AutoLisp is just barely suitable (IMHO) for writing simple
keyboard macros.  For serious applications, I would *not* recommend it.
It's obvious that the folks at AutoDesk have never used AutoLisp for even
one real AutoCAD-based application.

				- Gary Oberbrunner
				Thinking Machines Corporation
				245 First St
				Cambridge, MA 02142
				·····@think.com
From: Ted Dunning
Subject: Re: Autolisp from Autocad
Date: 
Message-ID: <TED.92Apr1125557@lole.nmsu.edu>
In article <···················@prometheus.think.com> ·····@think.com
(Gary Oberbrunner) writes:

   I have used regular lisp (Common Lisp) somewhat extensively, and
   I've written a few thousand lines of AutoLisp, and I can tell you
   unequivocally that AutoLisp is *not* a real lisp.

	... many objections ... some very common lisp-o-centric ...

   In conclusion, AutoLisp is just barely suitable (IMHO) for writing
   simple keyboard macros.  For serious applications, I would *not*
   recommend it.  It's obvious that the folks at AutoDesk have never
   used AutoLisp for even one real AutoCAD-based application.



i have heard that AutoLisp was supposed to have been based on scheme.
it so, they are still a _long_ way short.  


what i don't understand is why they don't just drop in a simple scheme
interpreter.  since AutoLisp is _soooo_ limited almost anything has to
be a proper superset, and it can't be slower.


so why not just put in elk or scm or _something_ useable?
From: David Betz
Subject: Re: Autolisp from Autocad
Date: 
Message-ID: <64710@apple.Apple.COM>
In article <················@lole.nmsu.edu>, ···@nmsu.edu (Ted Dunning) writes:
> what i don't understand is why they don't just drop in a simple scheme
> interpreter.

Actually, AutoLisp is based on a *very* early version of my XLISP language
and XLISP was based on MacLisp, not Scheme.  I've suggested to AutoDesk that
they upgrade their LISP and their response was that they expected their ADS
system to replace AutoLisp for most serious AutoCAD extensions.

Also, the reason they kept AutoLisp so small was that it was limited to 64K
in the early releases of AutoCAD.  They didn't have the space to even keep
up with the enhancements I was doing to XLISP.

David Betz
From: Benjamin Olasov
Subject: Re: Autolisp from Autocad
Date: 
Message-ID: <1992Apr1.234320.17788@cs.columbia.edu>
In article <···················@prometheus.think.com> ·····@think.com (Gary Oberbrunner) writes:

>I have used regular lisp (Common Lisp) somewhat extensively, and I've
>written a few thousand lines of AutoLisp, and I can tell you unequivocally
>that AutoLisp is *not* a real lisp.

AutoLisp certainly isn't a CLtL compatible Lisp, but I'm not sure that
means it's not a _real_ Lisp, unless that's how you define a real
Lisp.

>- No for or dotimes or loop or any decent looping construct (the *only*
>  looping construct is (while ...)).

This isn't true - there's also a 'repeat' function.

>In conclusion, AutoLisp is just barely suitable (IMHO) for writing simple
>keyboard macros.  For serious applications, I would *not* recommend it.
>It's obvious that the folks at AutoDesk have never used AutoLisp for even
>one real AutoCAD-based application.

ADS is in theory the provision AutoDesk has made for applications that
need to be larger/faster than typical AutoLisp applications - doesn't
do much for those of us that would rather write code in Lisp - perhaps
someone out there will soon release an AutoLisp->ADS translator ;-).

>				- Gary Oberbrunner
>				Thinking Machines Corporation
>				245 First St
>				Cambridge, MA 02142
>				·····@think.com


-- 
Ben Olasov		······@cs.columbia.edu