home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!contessa!mwm
- From: mwm@contessa.palo-alto.ca.us (Mike Meyer)
- Subject: Building a LISP (WAS: LISP - Don't use it.)
- Newsgroups: comp.sys.amiga.programmer
- Distribution: world
- References: <mwm.2k43@contessa.palo-alto.ca.us> <BxDB5t.EC9@fc.hp.com>
- X-NewsSoftware: Amiga Yarn 3.4, 1992/08/12 15:49:52
- Keywords:
- Summary:
- Message-ID: <mwm.2kd1@contessa.palo-alto.ca.us>
- Date: 7 Nov 92 20:20:55 PST
- Organization: Missionaria Phonibalonica
- Lines: 50
-
- In <BxDB5t.EC9@fc.hp.com>, koren@fc.hp.com (Steve Koren) wrote:
- > Mike Meyer (mwm@contessa.palo-alto.ca.us) wrote:
- >
- > > The only thing that makes
- > > LISP-like languages "quick&easy to interpret" is that the syntax is
- > > trivial. Almost everything else about the language makes it HARD to
- > > implement. That's because the language is designed to be elegant and
- > > powerful, as opposed to easy to implement or easy to use.
- >
- > Ok, I'll bite. Why do you consider LISP as hard to implement? I've
- > written a LISP interpreter to test some namespace caching techniques
- > I was working on. It is fairly complete, and faster than GNU lisp
- > or X-lisp 2.0 by quite a bit in many cases. I've also written both C
- > and Pascal compilers and a Unix ksh-like script language interpreter.
-
- Depends on what you mean by "fairly complete." If you provided a
- C/Pascal level of functionality, then you're right. About all that's
- left is the garbage collector, which is still simpler than a C or
- Pascal parser. However, if you throw in the things I expect to find in
- a LISP (lexical binding, closures, continuations, and backquotes to
- name a few) then it becomes more difficult. But those are the features
- designed to make LISP elegant and powerful, etc.
-
- > In fact,
- > once you get the parser done (which is very easy) LISP becomes almost
- > trivial to write if you use good object oriented programming techniques,
-
- That's sort of how I feel about conventional languages, only I'd say
- "good structured programming technics". That's because the primitives
- in most of them are, well, primitive. I don't have your compiler
- experience, though; except for coursework, I've built "little
- languages" that I can design to orthogonal and straightforward.
- Building them as LISP extensions means I even get parsers for free.
-
- > (BTW, I'm not disagreeing; just curious about why you think that.
- > Everybody has their own concept of what is hard and what is easy, and
- > you can't say one is "right" or "wrong", of course. I consider
- > hardware design almost impossibly hard, but its trival for lots of
- > folks :-) )
-
- I think doing a "modern" LISP is hard. That means you've got all/most
- of the things I mentioned. Doing an "older" lisp - dynamic binding (a
- bug), ignoring the funarg problem, and as an interpreter is pretty
- trivial. That's why they're used for "simple" macro/script languages.
-
- BTW, XLISP is notoriously slow, and ELISP wasn't designed for speed.
- Almost any of the Amiga Schemes (including XScheme) will be faster.
- ARexx falls in the middle.
-
- <mike
-