On May 21, 2011, at 4:47 PM, mike.w.me...@gmail.com wrote:
> Lee Spector <lspec...@hampshire.edu> wrote:
> >The reason that I think that this re-indenting feature is so important [etc]
> 
> This is an important feature, and I had overlooked it - but does it have to 
> be available in the editor? Remember, the goal is a "single download to 
> clojure" with enough support to work on simple problems and get a feel for 
> clojure, not anything that anyone might consider an optimal clojure 
> develpment environment.

Personally I consider this to be a threshold feature (like bracket matching): 
without it, I really wouldn't want to use it for more than a quick demo, while 
a system with the threshold features of bracket matching and auto-reindenting 
would be adequate even for mid-sized projects, fine for an intro programming 
course, etc. Not as good as an IDE that integrates the REPL and the editor and 
other fancy features like symbol-completion and integrated documentation and 
arglist-on-space, and if one of those can come with a trivial setup process 
then I'd be all for that (and there are some projects that may be getting close 
on that -- MCLIDE looks the closest to me right now, although it's Mac only). 
But people could do quite a bit in a system with the threshold features without 
going crazy. 

> So, instead of having an editor command region/function reindent to show the 
> actual structure of the code, maybe you need to switch to a repl and run 
> (indent-code "myfile.clj") to see what the structure really is. Actually, I 
> would argue that that functionality ought to be in clojure to to provide a 
> "standard" of sorts that various IDE's/editors can follow for indenting 
> clojure.

I see bits of pretty-printing functionality are already present, although I 
haven't played with them and I'm not sure if they do this or if they're 
intended to. I agree that it would be great to have this functionality to help 
tool builders, if it's not already there. But I don't think it's particularly 
helpful to require users to cut/paste from their editor to a REPL and then back 
again to see the structure of their code. It's certainly not beginner friendly.

> The goal isn't even as high as "reasonable" - it's "usable." So even the vi 
> :ai feature - which indents to the first non-whitespace character of the 
> previous line - would do. If we can get a more useable behavior with some 
> smarts about adding more indentation (and I'd agree, an automatic 8-space 
> indent doesn't qualify), so much the better.

We may just disagree about this. I agree that it's possible to write 
Lisp/Clojure code without auto-reindenting but then again it's also possible to 
write it on punch cards or by shorting pins on an I/O card :-). 
Auto-reindenting is so ubiquitously useful for writing Lisp code, and 
apparently so easy to provide (since it's been in most Lisp editors for 
decades), and so important for beginners to allow them to see the syntax of the 
code they're writing, that I just wouldn't recommend ever writing Lisp/Clojure 
code in an editor that doesn't provide this. Providing auto-reindenting (along 
with a couple of other things like bracket matching) makes such a big 
difference that it makes the editor "usable" in a different sense.

> Also remember, the idea is that we *bundle* a properly-configured Jedit with 
> the distribution. I chose Jedit because it was reasonably light-weight, 
> written in Java (so it should run anywhere Clojure does) and has most of the 
> right features. Problems experienced in getting it downloaded & configured 
> should be circumvented by making sure everything works properly in what gets 
> bundled, never mind if it's the latest, etc. I still consider it a stopgap 
> until someone writes a lightweight IDE in clojure, ala Python's IDLE.


But some stopgaps fill bigger gaps...

 -Lee

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to