On Jul 20, 10:15 am, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> Oh, maybe I understand: by "partial drafts", you mean "pseudo-code",
> directly written in clojure, is it this ?

It could be pseudo-code or partial implementations or code that is
more or less complete but won't compile because the functions or libs
it is using aren't written yet. Or a number of other things that might
cause compilation to fail.

The non-compiling code tends to be syntactically correct, at least
enough to get the Enclojure paren-matching, bulk formatting and code
navigator to work - these are all things I want to help me quickly
navigate the drafts.


> If there was a shortcut key to quickly wrap/unwrap a top level defn with
> (comment), and if the keyboard shortcut for "evaluate top level form in the
> REPL" would be smart enough to detect top level comment and send to the REPL
> the unwrapped form, would it help you ?
> That way, your files would visually show the "pseudo-code" parts (those
> within comments), and your namespaces will remain in a loadable shape,
> eventually relieving you from manually load your project "piece by piece"
> every time you must restart a REPL ?

Actually, it's an interesting idea.

If I were to think aloud on a possible feature in a future IDE, it
could go something like this:

- Some special markup for pseudo-code. Not (comment) as it is already
used for comments, but perhaps something like (pseudo) or (draft). It
would act as a comment from the compiler's perspective but the IDE
could treat it differently.
Or perhaps a keyword argument to comment, ignored by the compiler but
read by the IDE - like (comment :pseudo ....).

- The contents of (pseudo) would be parsed and displayed in the code
navigator window (I assume CCW has one as well?) as a distinct group
or marked in some other way, so you could at a glance see which
functions/vars are implemented and which ones are still at the draft
stage.
It would be a code-level TODO-list of sorts.

It would have the advantage over what I am doing in Enclojure today
that I could load the non-draft functions without resorting to
"evaluate expression", and the navigator window would explicitly show
me what remains to be implemented. Very handy for large files.

I can't see the immediate need to send pseudo-code to the REPL - it's
in the pseudo-tag because it doesn't work, isn't it? (Copy/paste works
fine for those rare occasions where I might want to do so anyway.)
I would probably edit it in the editor, move it out of the pseudo-tag
when it is ready for testing and evaluate it then.

I guess something like this would take a few iterations to get right,
but I imagine I would find it very useful.


Regards
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