On Dec 11, 6:39 pm, TNeste <tomi.ne...@gmail.com> wrote:
> On Dec 10, 2:15 pm, Simon Brooke <still...@googlemail.com> wrote:
>
> > I note people seem mainly to be using Emacs as an editing/development
> > environment for Clojure. But as people keep pointing out, Clojure is
> > homoiconic; the canonical source of a function is not a stream of
> > bytes read from a file, but is a structure in core.
>
> > Now, in-core editing does raise some issues - there needs to be some
> > means of associating the structure which is the canonical source of a
> > function with the function itself, so that when the user invokes (edit
> > froboz) (or (edit 'froboz), or whatever), the source structure for
> > froboz is displayed in the editor. But in-core structure editors are
> > extremely powerful and useful when editing homoiconic languages, so...
> > is anyone working on an in-core editor for Clojure?
>
> Do you mean structured editing combined with image based development?
> I haven't really looked that closely at the old Interlisp documents
> but I suppose the source code is managed the same way it is in most
> Smalltalk systems but I have always been a bit puzzled about how that
> works with Lisp.
>
> In Smalltalk it is fairly straightforward since there is an obvious
> mapping from classes and methods to source code. With lisp it is not
> that simple as there is no limit to the syntactic forms that the user
> might want to query and edit in different forms. For example, if I
> have (define-foo my-foo ...) macro that is used to define some complex
> function named my-foo what happens when I do (edit 'my-foo)? Do I get
> the original define-foo form or the macroexpansion? What about when
> define-foo does something more complex like defines a bunch of methods
> and datastructures or binds my-foo to a closure? There needs to be
> mechanism that associates evaluated forms with the name(s) of the
> resulting object(s) and it probably couldn't, in general, be done
> automatically.

I am indeed looking back at structure editors such as DEdit on
InterLISP - which I rate as the best programmer's editor I've ever
used, superior even to its successor SEdit - but also to the editor in
the versions of Portable Standard LISP I was exposed to. I don't know
what the genesis of those was. I also wrote my own structure editors
for other variants of LISP I worked with - in a REPL on a TTY, a
primitive structure editor is pretty simple to write (you basically
only need a pretty printer). However, the DEdit style editor where you
can see the whole of the function or other data-structure you're
working on while operating on some small part of it is vastly
preferable, but rather more complex to write. Not /that/ difficult,
however, if you can pretty-print source into a Swing textbox.

Chouser, when you have some code you'd be willing to share I would be
extremely interested in poking at it.

And yes, Scott, this is a step towards Smalltalk-style (or old-
fashioned Lisp style) image based development. You may well be right
that this is a bad idea - but we won't know until we try... and in the
end we may disagree.

The next step, of course, it to write SYSOUT and its counterpart,
SYSIN ;-)
--~--~---------~--~----~------------~-------~--~----~
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
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