I haven't tried CCW, but I am happy with Enclojure 6.8. (In 6.9 the
file navigator which lists the functions and vars in the file doesn't
work yet, and the navigator is perhaps 50% of the value I derive from
an IDE.)

> Am 19.07.2010 um 20:50 schrieb Laurent PETIT:
> > If you work from the files, then you simply do not save the files until 
> > you're "happy" with the codebase.

I wouldn't want to have the REPL autoload anything just because I save
a file, simply because most of the files I am editing are in a broken
state most of the time, and could stay that way for days.

Saving is something I do out of habit, because I'm going out for
lunch, because I want access to the files from another tool (backup,
version control, move to different editor or computer, whatever).
I'm thinking of "save" as "save the text in this file" rather than
"recompile and reload everything", I don't want "save" to give me
exception stacktraces and a boatload of warnings.

I once used a Java IDE that tried to recompile the project every time
I saved. I never got used to that either and found it a constant
nuisance. And it's even worse in a REPL-based language where a reload
may mess up carefully arranged global state.


I'm working similarly to Meikel, using the REPL for testing of simple
draft/mock functions and using "evaulate expression" at least as often
as "load file" - the file as a whole is broken and won't load, but I
just finished this particular function and want to test it.

I normally start out with a sketch or skeleton of the whole project,
with multiple files and lots of partial drafts, and fill out the
details over time (days or weeks).
Being able to finish and test functions one by one is one of the great
benefits of REPL-based development IMHO. I wouldn't want anything that
forces me to have every file in a loadable state all the time.

Perhaps relatedly, someone doing a usability study of how newspapers
journalists work told me that journalists (at least the ones she were
studying) didn't write articles by starting at the beginning and
finishing at the end.
Instead they wrote down snippets, sentence fragments, nifty turns of
phrase etc. in whatever order they happened to think of them, spread
the fragments out on the screen and copy/pasted the parts together to
assemble a complete article.
According to her this was a surprisingly efficient way of working,
they could finish an article in no time compared to writing it in a
more traditional start-to-finish fashion. Perhaps because the time you
need to think of what to say about X can be spent to say something
about Y.

This is somewhat similar to my preferred way of working with code, I
start out with a jumble of fragments and assemble them into complete
code over time.
The Java development style where you need the whole file (or even
worse, the whole project) to compile in order to test a single method
is a lot slower, at least for me.


>     a. So having an "IDE-dedicated live server REPL" seems like I
> could relieve the user from explicitly launching a REPL (it's weird
> and counter-intuitive for a user to have to somehow "manually"
> trigger the IDE user assistance !).

I can't tell. I have the REPL running 100% of the time I am using a
Clojure IDE, so this is an issue I never encounter. But if you need a
"server REPL" for internal reasons that's fine by me, as long as it
doesn't mess with the REPL I am using.

> I may still make the default behaviour be "automatically
> reload", and for people wanting the maximum safety, "don't automatically
> reload").

I'm perfectly fine with that :)


For what I would like:

* I would be happy to have a one-click option (button or keyboard
shortcut) to reload everything that is currently loaded.

* If there is some way to undefine vars that were loaded from file
when the vars are deleted from the file and the file is reloaded, I
think I would like that too. It would save many a REPL restart to
check that newly refactored code doesn't depend on something that was
deleted. (Although it might come back to bite me if I have overridden
the file definition in the REPL and a reload removes both of them, I
expect I would eventually learn not to avoid that.)
Or perhaps a one-click manual "restart REPL and reload current files",
somewhat analogous to a Java "clean and build".


I should mention that my working habits were formed with Emacs and
Allegro Common Lisp and a decade with various Java IDEs.
We adjust to the tools we are using, at least to some extent, and
people coming to Clojure from elsewhere may have different
expectations.

If we want to move the state of Clojure IDEs forward, we may have to
break some expectations for people like me, and "but that's how we did
it in X twenty years ago" is not a sufficient reason to keep something
in and of itself.

I don't think it is possible to please everyone simultaneously, so if
you think you have a better idea and can find at least a few people
who prefer it your way, I'd say go for it :)

Thanks for raising the question, it will be interesting to see what
comes out of it.


jf

-- 
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