[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: DrScheme as Emacs-like kitchen sink
As long as we're wish-listing for DrScheme, I thought
I'd add my own vapour-ware to the mix:
To make it more convenient to browse large Scheme files,
it would be nice if you could take advantage of the natural
hierarchical nature of s-expressions in order to collapse/expand
your code, like a tree-widget, but right on the page.
This is exactly the way that Internet Explorer *displays* XML,
but without being an editor.
For example consider the following Scheme code:
(define rev-append
(lambda (ls1 ls2)
(if (null? ls1)
ls2
(rev-append (cdr ls1) (cons (car ls1) ls2)))))
Imagine that the editor could be configured to insert a '+' widget
into strategic locations in the code:
(define rev-append
([+]...)) ; here the "[+]" is just text representation of a hypothetical
[+]-widget.
When you clicked on the "[+]" it would change to a "[-]" and
expand out the expression:
(define rev-append
([-]lambda (ls1 ls2)
(if (null? ls1)
ls2
(rev-append (cdr ls1) (cons (car ls1) ls2)))))
(The widget would, of course, only be a feature of the editor and
would not add anything to the real code.)
"Strategic locations" for the [+]-widget might be, for example,
the list following the symbol in a define, or analogous
clause in a letrec.
In fact, you could use the pattern matching stuff to make
it easily customizable...
Cheers.