landauer@morocco.Sun.COM (Doug Landauer) (02/12/88)
> Pure syntax directed editors have severe drawbacks. ... You're probably right about this, but ... > The problem is that certain types of common text-editor transformations > (e.g. "change 'while a { while b {}}' into 'while b { while a {}}'" or > "change all occurrences of a.b into pa->b") become extremely difficult to > do in a syntax directed editor. Any decent syntax-directed editor (SDE) should be able to do either of these operations just as simply as a text editor does. For the first, you delete "a" (this should be a one-key operation; the spot where "a" was then turns into the nonterminal <bool-expr>, while "a" is put on the "deleted" stack), you replace that new <bool-expr> by copying "b" (this might require one key and two mouse actions), and then replace the second "b" by swapping it with the "a" from the "deleted" stack (again, this should not require more than a mouse click and possibly a keypress). The second "change all ..." should be available as a single ("command-mode") instruction, just as it is in any decent text editor; or it should be possible to do it with a selection via a mouse, a simple menu choice, and then typing in the replacement. It should actually be easier than it is for most text editors, since most text editors would normally need a little help to avoid changing "xa.by" into "xpa->by", while an SDE wouldn't. Perhaps you've never seen an SDE that has as rich a set of commands as is required for one to come into widespread use. If this means that it is not a "pure" SDE, then perhaps a "pure" SDE is about as useful as "pure" LISP. > Ask yourself "how often in the course of > writing code in a text editor is my code syntactically correct?" This is not particularly relevant -- by my definition, an SDE need not require that the entire program be syntactically correct or complete at any particular time, including the time a program is run. About those "severe drawbacks" mentioned above -- the one I've heard mentioned most is that an SDE requires more computer resources than a text editor (even including EMACS), and that the evolution of SDEs is in a much more primitive state than that of text editors. Perhaps, now that some of us have Sun4's on (or next to) our desks, we'll start to see SDEs that make good use of those resources. > These opinions have nothing to do with Microsoft Corp. or its products. Nor these, of Sun. This is a fantasy, not a product announcement nor even a rumor. -- Doug Landauer Sun Microsystems, Inc. ARPA Internet: landauer@sun.com Software Products Division UUCP: ...!sun!landauer