Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ucbvax.UUCP Path: utzoo!linus!decvax!tektronix!ucbcad!ucbvax!root From: root@ucbvax.UUCP Newsgroups: fa.editor-p Subject: Emacs vs. Z in 24 lines (sort of) Message-ID: <92@ucbvax.UUCP> Date: Mon, 10-Oct-83 03:23:58 EDT Article-I.D.: ucbvax.92 Posted: Mon Oct 10 03:23:58 1983 Date-Received: Thu, 13-Oct-83 06:53:35 EDT Sender: root@ucbvax.UUCP Organization: U. C. Berkeley Computer Science Lines: 157 From JQJ@SU-SCORE.ARPA Mon Oct 10 00:23:38 1983 Mr. Kerns: Please acknowledge receipt of this letter to shivers@yale. I'm not sure if I'm going to get your address right. I read with interest your response to Michael Dyer's support of Z over Emacs. I am a strong supporter of Z, but I think Michael missed some of the essential differences of Z due to some unfamiliarity with Emacs. I've never used Zmacs, but I used Zwei fairly extensively on a Cadr at the MIT AI Lab, as well as the ITS Emacs for a summer, and I suffered under Unix Emacs for longer. I know, for instance, that one can rebind commands in Emacs, go into Picture Mode, and write macros. I also know that cursor-motion was not an issue in avoiding cursor-keys. I like mice. But I still think that Emacs (or Zwei, or Zmacs) has serious, fundamental problems that Z (or Win or Ice or U) has avoided. I also think that Z is a bit misunderstood, because Emacs is everywhere, whereas Z is at Yale. So I composed the following flame to hopefully address that sort of thing. If it is successful in that task, I'd appreciate your posting it to whatever bboard you distributed your previous message to. Thank you. -Olin Shivers As an ex-Yalie, I shall join the fray and say where it is that Z surpasses the emacs/Zwei/Zmacs editors. I'll get the heart of my argument onto 1 page, for those of you who have a small attention span for this kind of flamage. Z wins over Emacs because (In descending order of importance): - Z uses the quarter-plane model of a file, rather than the stream model. (Except where the stream model is appropriate, e.g. when you wish to delete a stream of text like a lisp defun) - Z has a powerful, regular, flexible, clean argument facility, as opposed to emacs' ad-hoc crufty old arguments. - Z is fantastic for crowded systems. Much more efficient than emacs. This of course means nothing to those of us with personal machines. Where does Z lose in comparison to Emacs? - Not very extensible - Doesn't handle bit-mapped screens, mice, personal machines, etc - Doesn't know all that much about the syntax of the text you are editing (Although it knows a bit) Note Well: All of the lossage of Z is the due to the implementation, NOT due to the style or "philosophy" it represents. The latest incarnation of Z, as Dyer mentioned, is called U, and fixes them all, while preserving all the features that make all us Yalies so vociferously supportive. Emacs is a very powerful editor. But it is OLD. Folks have built it up in pieces over a long period of time. You pay a price for this: inefficiency, and fragmentation. On a mainframe, emacs is a pig. Z supports large numbers of users because: - it is written in Bliss, which is more efficient than Teco - it doesn't try to do the hairy things (the 98% philosophy) - it made very clever use of the Tops-20 i/o characteristics. Unless you work on a mainframe, these considerations are no longer so important. (Of course, a lot of us DO work on a mainframe with 24x80 terminals, which makes that side of Z rather significant.) More important than inefficiency in emacs is fragmentation. I don't think it has a very unified approach to things, particularly in its manner of handling arguments. This is due to its being built up incrementally. In Z, most commands accept all of the below as arguments with equal grace: -a box -a stream -a number -user entered text -text on the screen or -a well chosen default. This makes the operation orthogonal to the type of operand, one of the reasons people keep saying how easy it is to learn Z. The other great idea of Z is the quarter-plane model of a file. Stream-based editors are infuriating in a myriad of small ways when you become acustomed to the quarter-plane. As in when you want to insert text in the "middle" of a tab. Note that Z allows you to do stream-based operations, like delete all the text in a stream, so you don't lose one functionality to gain another. In essence, what makes Z such a win is that it was able to snarf all the great ideas that Emacs demonstrated (modeless screen editors are good), yet make a clean break from the old design for a fresher approach. Z had the advantage of hindsight. Now, there are those of you who prefer extensible editors, or editors that know a great deal about the text they are editing. That is to say, editors written in LISP. I agree. I think that an extensible editor with the quarter-plane model and good argument handling would be the best of both worlds. Hence I eagerly anticipate the final tuning of U. Not Zmacs. Zmacs has all the featurefulness, but not the right underlying design. Z has the right design, but lacks extensibility. You can add extensibility, but you cannot "add" something as fundamental as an "underlying design." That is why I claim it is time to move on from Emacs, a great editor in its time. So much for the overview. If you stay tuned for another page, I'll make picayune technical points about Z. Z is more portable than people think. Versions are written in Bliss, C, and T (Scheme). The C version runs on the Berkely Unix and VMS systems at Yale. I wrote this letter at CMU in it. Since it is straight C rather than C and Mock-Lisp, it's a lot more efficient than Unix Emacs. T is supported for Vax Unix, VMS, and Apollo workstations. So U should be pretty portable. People who object to cursor keys can always rebind them to Emacs bindings. A Unix fanatic at Yale had a VI-like command set for his Z. Stallman flamed on Z about a year ago (I think), claiming that an editor that overwrote text instead of inserting text was "broken." ("Inserting" means the character I type is inserted in front of the character the cursor is on; "overwriting" means the character *replaces* the character the cursor is on. Just to get the definitions straight) People have this misconception that Z is just an overwriting editor. Look: there is this one-key command (^n). It toggles the insert mode. You're told on the status line what mode you are in. I usually work in insert mode, unless I shouldn't. It is easy, and commonly done, to shift back and forth. No problem. A common counter to us Z-types who bitch about Emacs is to say: Oh, yes, Emacs does X for you. X can be "picture mode", or "overwriting text", etc.. Well, yes, but... do you ever do it? No. Is it easy to do? Usually not. The stream-type things that Z does are easy to do, and commonly done. It's a one-key command to delete a stream (^s). One key to toggle the insert mode. But - it's a pain to do all the quarter-plane stuff in Emacs. Not really an integral part of the system. Finally, lest you think the phrase "98% editor" connotes a total wimp of a program, note that the Bliss version (the best one) does all the following: - fill and justify text - paren or bracket balance Lisp, Bliss, Scribe, C, et al - compile your program in the background, saving the error messages. When the compile is done, a one-key command takes the next error message, displays it in the message window, and moves the cursor to the location of the error in your file. Very nice. (.mss files compiled by Scribe) - A great Session Manager. Run processes in a window, stuff text to them. - Two-key command takes you to the location of the next misspelled word in your file. You can correct it, let the computer try to, or insert the word in the dictionary. - Interactive help facility. - I'm very sure it's free to any University with a Dec20 to run it on. (Same for the C version) I promise nothing; ask Odonnell@yale. Well, flame off. If you made it this far, you are a true stoic. I generally despise the kind of frothing at the mouth that editor discussions provoke, but this has been building up for a while. Z is to editors as LISP is to programming languages: the One True Way. -Olin Shivers