scsh-users
[Top] [All Lists]

Re: Ousterhout and Tcl lost the plot with latest paper

To: scsh@martigny.ai.mit.edu
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Date: 15 Apr 1997 17:33:35 +1000
Organization: Comp Sci, RMIT University, Melbourne, Australia.
Bryan Oakley <oakley@healthcare.com> writes:
>To me, the biggest drawback in embedding lisp in a commercial
>product is that list pretty much requires a text editor that knows a
>little about lisp syntax.

Ok, hands up all the people who *can't* get
 - a free vi clone (stevie, vim, vile)
 - a free Emacs lookalike (jove, top, emacs)
 - a programmer's editor such as "alpha" (which ironically uses tcl)
All the DOS, Windows, OS/2, UNIX, and VMS users have their hands down.

The editor I use knows
 - how to move forward over an S-expression
 - how to move into the next S-expression
 - how to move backwards over an S-exression
 - how to copy/cut S-expressions
 - how to switch S-expressions
 - how to autoindent to the same column as the previous line
   (the autoindent function copies leading comment symbols too)
 - how to put matching brackets around the next/previous N S-expressions
 - how to highlight the matching left bracket when a right bracket of
   any type is entered.

The total cost is 5030 characters of C *source code*.
Not lines:  characters.
And all of these things are also used (with the appropriate syntax
table) when editing C or Fortran or Pascal or Ada or Java or HTML
(treat <> as brackets; it helps a lot).  This editor does _not_ know
how to pretty-print Lisp.  I've written a fair bit of Lisp code with
it without any trouble.  This isn't rocket science!  Even vi can do
a lot of these things, and the newer vi clones can do quite a bit.

Here's the punch-line:  TCL has all those nested curly braces.
Can you seriously imagine editing TCL with an editor that doesn't
know about TCL quotation marks and curly braces?  Well, the editor
I use _can_ handle these things, and the code it handles them _with_
*IS* the code it uses for Lisp!
 - move forward over a "string" or {block}
 - move into the next {block}
 - move backward over a "string" or {block}
 - copy/cut a "string" or {block}
 - switch strings/block
 - autoindent
 - put matching braces around things to make a block
 - highlight the matching { when a } is entered
You need the *same* things for editing TCL that you do for editing Lisp.
It is a very tiny matter of programming to write one set of code that
handles both, simply by switching a small syntax table (I know because
I've done it).  Those 5030 characters of C are just as useful/necessary
for TCL as they are for Lisp.

So where is the advantage of TCL over Lisp?
Not in the editor, that's for certain sure!
-- 
Will maintain COBOL for money.
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.

<Prev in Thread] Current Thread [Next in Thread>