Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!cs.utexas.edu!news.sprintlink.net!demon!btnet!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!zs
From: zs@munta.cs.mu.OZ.AU (Zoltan Somogyi)
Subject: Re: Prolog syntax
Message-ID: <9512719.2027@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU (CS-Usenet)
Organization: Computer Science, University of Melbourne, Australia
References: <9511221.23905@mulga.cs.mu.OZ.AU> <3nkjnc$q0o@goanna.cs.rmit.edu.au> <9512019.12772@mulga.cs.mu.OZ.AU> <3o84ev$65g@gabriel.keele.ac.uk>
Date: Sun, 7 May 1995 09:10:56 GMT
Lines: 99

paul@cs.keele.ac.uk (Paul Singleton) writes:
>Shouldn't we be using syntax-aware editors?  Indeed, shouldn't we be using
>semantics-aware editors?  When making a small change to a program, the ratio
>of genuine-decisions to opportunities-for-mistake is extremely low.

This approach has been quite thoroughly explored in the early eighties.
Some people have even built systems that take a language description and
generate an editor specialized for the language. However, this technology
has never gathered a significant user base.

One reason for this is that the way programmers make modifications often
requires that the program be inconsistent in arbitrary ways, and language
speficic editors lose much of their usefulness if they are designed to
accommodate this. Another reason is simply that people are quite loath to
change editors. For example, I have used vi for about fifteen years.
For most of that time I have never had to think about vi commands at all;
I just think "this word should be *there*" and my fingers do the rest.
When I use emacs (e.g. when running the info browser) my work is much slower;
I often give vi commands without thinking and have to undo their effects
before giving the corresponding emacs command. The same would happen
with a language-sensitive editor.

Another drawback of language-sensitive editors is that they cannot be
used when one is editing a document or a program in another language.
Having to constantly switch between editors when one is working on
two or more projects at the same time is very annoying. The only way
around this is if the "language-sensitive editor" is just a modification
of a general-purpose editor, as in the various specialized modes of emacs.

Zoltan Somogyi <zs@cs.mu.OZ.AU> http://www.cs.mu.oz.au/~zs/
Department of Computer Science, University of Melbourne, AUSTRALIA

P.S. Some references on the work of the Cornell group on language-specific
editors:

%A Thomas W. Reps
%T Generating language-based environments
%I MIT Press
%C Cambridge, Massachusetts
%K book
%D 1984
%P 138

%A Tim Teitelbaum
%A Thomas Reps
%T The Cornell program synthesizer:
a syntax-directed programming environment
%J Communications of the ACM
%K cacm
%V 24
%N 9
%D September 1981
%P 563-573

%A Thomas Reps
%A Tim Teitelbaum
%T Language processing in program editors
%J IEEE Computer
%K ieee_comp
%V 20
%N 11
%D November 1987
%P 29-40
%K Cornell Program Synthesizer, Synthesizer Generator
%K incremental compilation, attribute grammars

%A T. Reps
%T Optimal-time incremental semantic analysis for syntax-directed editors
%J Conference Record of the Ninth ACM Symposium
on Principles of Programming Languages
%C Albuquerque, New Mexico
%D January 1982
%K popl popl9 popl82
%P 169-176

%A T. Reps
%A T. Teitelbaum
%T The synthesizer generator
%J Proceedings of the 1984
ACM SIGSOFT/SIGPLAN Software Engineering Symposium
on Practical Software Development Environments
%E P. Henderson
%C Pittsburgh, Pennsylvania
%D April 1984
%O published as Software Engineering Notes 9:3
and as SIGPLAN Notices 19:5
%K psde psde84
%P 42-48

%A Tim Teitelbaum
%A Thomas Reps
%A Susan Horwitz
%T The why and wherefore of the Cornell Program Synthesizer
%J Proceedings of the 1981 ACM SIGPLAN/SIGOA Symposium on Text Manipulation
%C Portland, Oregon
%D June 1981
%O published as SIGOA Newsletter 2:1&2 and as SIGPLAN Notices 16:6
%K tm tm81
%P 8-16
