[plt-dev] IDE and completion

From: Guillaume Marceau (gmarceau at gmail.com)
Date: Tue May 4 16:57:59 EDT 2010

On Tue, May 4, 2010 at 3:08 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> He wanted to have a key-binding/structured editing where you would
> introduce a new form where the editor knew what the pieces would be.
> So if you did Ctrl-Define (whatever) it would insert
> (define _ _)

I think I know what you're referring to. You're talking about the
templating feature we had in DivaScheme for a while, until we took it
out. I don't think it's a useful inspiration for Matthias' concerns
about autocompletion.

The feature was, when you typed an open paren, then some identifier,
then a space, DivaScheme looked up the word in a collection of
"templates" (not in the htdp-sense.) If it found one, it replaced the
open paren, the word and the space with the template.

For example, if you typed ("^" is the position of the cursor)


when you pressed the space, the buffer would turn into

   (letrec ([$name$ $expr$] ...) $body$)

DivaScheme had support for filling in the "$" placeholders, and for
copying the "[$name$ $expr$]" part if you needed another binding in
your LETREC.

For professional programmers, it was unbearable. We found it is
impossible to resist typing the "([" after typing LETREC. Old habits
die hard, so we took the entire feature out.

At one point we were considering whether this kind of templating might
be useful to beginners, but we never really pursued it.

Posted on the dev mailing list.