Subject: Re: Why do I get error messages when using tabs?
From: rpw3@rpw3.org (Rob Warnock)
Date: Sat, 11 Aug 2007 21:18:54 -0500
Newsgroups: comp.lang.lisp
Message-ID: <yLKdnd7pjOyT8yPbnZ2dnUVZ_jydnZ2d@speakeasy.net>
Pascal Bourguignon  <pjb@informatimago.com> wrote:
+---------------
| "webmasterATflymagnetic.com" <webmaster@flymagnetic.com> writes:
| > As to the layout, it seems very sensible to me to line up the
| > parentheses, especially as Lisp positively thrives on them! Notepad
| > will clearly not highlight a matching bracket, and I'm not aware of an
| > IDE that I could use (is there a plug-in for Eclipse?), so I may be
| > laying my code out like Java for a while, and then collapsing them
| > into strings of )s when I know the program works.
| 
| emacs is THE lisp IDE.  
+---------------

That is indeed the politically-correct answer, but it would be good
if newbies occasionally hear that not *everyone* who productively
uses Lisp to get real work done uses the politically-correct IDE.
[Some of us even use (*gasp*) "Vi", and *prefer* it. Oh, the horror...]

*DO NOT* let the lack of a politically-correct IDE, or indeed *any*
IDE, stop you from using Lisp to get work done. One can usefully code
in Lisp with *any* editor, even Notepad. [Some Emacs bigots may have
heart attacks at this news. Tough.]

Now, it is also true that it's far easier to code good Lisp if one's
editor has at least these three capabilities:

1. Simple auto-indentation to the same level as the previous line
   when you type a newline [e.g., ":set autoindent" in Vi], though it
   *is* absolutely essential that your editor permit such indentation
   to be on *any* character position, not just at special "tab settings"
   [unless you can set a "tab setting" at every single character
   position!]; 

2. The ability to shift groups of lines back & forth [e.g., the
   "<<" & ">>" commands in Vi], and even better [though not absolutely
   necessary], shift whole s-exprs back & forth [e.g., the "<%" & ">%"
   commands in Vi]; and,

3. Parentheses-matching, that is, will blink or otherwise show
   you the matching open parenthesis when you type a closing one
   [e.g., ":set showmatch" in Vi], and also provides a simple way
   to jump back & forth between pairs of matching open & closed
   parentheses [e.g., the "%" command in Vi].

The classical indentation rules for Lisp are simple enough that 
the above three capabilities are all you *really* need to be *very*
productive in Lisp while still writing code that adheres to community
indentation standards. Just pick any editor with which you are
comfortable that offers at least these three features, and start
coding!!  Happy Lisp-ing!


-Rob

p.s. The above is *NOT* an anti-Emacs rant, but in instead a pro-Lisp
"Just do it!" rant. Obviously, given the great enthusiasm seasoned
Emacs or Emacs+Slime users have for their chosen IDE, there are
plenty of *additional* productivity advantages to be gained by
using "the one and only true Lisp IDE", but *any* editor with the
above three capabilities will get you 80% of the way, and that's all
you need to get started coding and doing useful stuff. And getting
experience in *coding* & *running* Lisp is really what's important!!
[Right, Kenny?]

Later, if you want to investigate various IDEs, fine.

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607