Hacker News new | ask | show | jobs
by gumby 775 days ago
As far as Lisps go, Teitelman implemented DWIM just for Interlisp (annoyingly it was the macro expansion engine so you couldn’t disable it). MACLISP and its derivatives never had that misfeature.

Of course the general concept was taken up elsewhere as well and is used to excellent (and terrible — I’m looking at you, Apple spelling autocorrect) effect.

That Wikipedia article you cited is weird. Even the example cited, the file reference DWIM, is a rather degenerate case that has nothing to do with lisp itself. Certainly DWIM doesn’t operate on the execution of emacs lisp, despite the article’s hand-wavy attempt to imply so.

2 comments

I just liked the definition of DWIM in that article. I don’t think DWIM operates in Emacs Lisp the way it did in Interlisp, and zygospore’s not exactly a good example, but I’ve come across ‘-dwim’ versions of commands that combine the functionality of multiple ones and try to deduce which particular functionality you wanted from the surrounding context—it’s nice.
Then what is DWIM for you? What did you want to disable in Interlisp? For me the concept does indeed have nothing intrinsic to do with Lisp.
DWIM in Interlisp was an automated error handler for Lisp code. It would be triggered on errors and then tried to guess possible fixes at runtime (misspelled functions&variables could be corrected, ...).

Though one might expect a bigger picture: "interacting with an agent who attempts to interpret the user's request from contextual information" (Teitelman/Masinter, The Interlisp Programming Environment, 1981).