Re: off-topic: Why is lisp so weird?
From: MSCHAEF.COM (mschaef_at_fnord.io.com)
Date: 02/29/04
- Next message: gnari: "Re: EOL Anchor under Windows"
- Previous message: Malcolm: "Re: Arthur O'Dwyer on the feasibility of simulating a Turing Machine"
- In reply to: nobody: "off-topic: Why is lisp so weird?"
- Next in thread: Phil Stripling: "Re: off-topic: Why is lisp so weird?"
- Reply: Phil Stripling: "Re: off-topic: Why is lisp so weird?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 29 Feb 2004 12:47:32 -0600
In article <165b3efa.0402282112.591b1b53@posting.google.com>,
nobody <nobody_u_should_no@yahoo.com> wrote:
>mikecoxlinux@yahoo.com (Mike Cox) wrote in message
>news:<3d6111f1.0402271647.c20aea3@posting.google.com>...
>> I'm a C++ programmer, and have to use lisp because I want to use
>> emacs. I've gotten a book on lisp, and I must say lisp is the ugliest
>> looking language syntax wise. What is up with this: (defun(foo()).
>
>(DEFUN FOO () NIL)
The syntax of Lisp is that way primarily because of its regularity. Every
program is represented as a generalized list, with only a few concessions
to the more diverse syntax folks have come to expect from languages like
C, etc. As a result, Lisp is more dependant than many languages on tools
like auto-indenting editors that support paren-matching. Of course, since
I'd hate to read a un-indended C program, I think the indention argument
against Lisp is specious at best.
The brightest side of all this is that since Lisp programs are built using
a construct that's so fundamental to the language, it's much easier to
write higher level code transformations than in C. In C, the preprocessor
can at best work with sequences of characters in the source text. In Lisp,
the macro facility can manipulate code at the level of syntax trees.
Python is an example of a language that provides AST manipulation in an
infix language, and while I haven't used it myself, the code I've read
makes it obvious that it's far less convenient than Lisp-style macros.
>> What were the lisp authors thinking? Why did Stallman use lisp in
>> emacs so extensively?
>
>C and C++ did not exist at the time. Do you think he should have used
>Fortran for this? *shudder*
The first version of Emacs was written in Teco macros. (If you really
want to *shudder*, do some research on that... :-) The modern GNU
Emacs and X Emacs are written with a layer of C that implements the Lisp
system and some editing primitives. Most of the higher level functionality
is written in Lisp.
>You can use better editors than Emacs. I'll give you a hint: no
>12-finger key combinations with right clicking
>and waving of a rubber wildebeest are happening in my office.
I can't say that such things happen in my office, even when I use Emacs.
>Just walk away and never look back, if you value whatever sanity you
>have left in you, mate!
Lisp gets a bad rap for a lot of reasons. IMO, if you enjoy programming,
and you haven't worked through writing some significant Lisp code, then
you've missed out on something useful. Even if you spend most of your time
in environments that have done better in the commercial space.
Consider this: 10 years ago (and for some of these features 30-40), Lisp
had syntax tree manipulation, multi-method dispatch, a metaobject
protocol, multiple inheritance, garbage collection, anonymous functions, a
highly interactive development environment, and first-class closures.
_All_ of these features are slowly finding there way into more mainstream
languages, with more chances of commercial success. If there truly was no
value in these concepts, and no value in knowing Lisp, this would not be
happening.
-Mike
-- http://www.mschaef.com
- Next message: gnari: "Re: EOL Anchor under Windows"
- Previous message: Malcolm: "Re: Arthur O'Dwyer on the feasibility of simulating a Turing Machine"
- In reply to: nobody: "off-topic: Why is lisp so weird?"
- Next in thread: Phil Stripling: "Re: off-topic: Why is lisp so weird?"
- Reply: Phil Stripling: "Re: off-topic: Why is lisp so weird?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|