Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!aero-c!gumby.dsd.trw.com!deneva!wiley!wilbur.coyote.trw.com!rob From: rob@wilbur.coyote.trw.com (Robert Heiss) Newsgroups: comp.unix.wizards Subject: Re: POSIX bashing (readline bashing) Message-ID: <27F43DE6.4B53@wilbur.coyote.trw.com> Date: 30 Mar 91 07:27:33 GMT References: <3446@unisoft.UUCP> <15621@smoke.brl.mil> <70319@brunix.UUCP> Sender: news@wilbur.coyote.trw.com (News Software) Organization: TRW Systems Integration Group, Redondo Beach, CA Lines: 46 In article <70319@brunix.UUCP> cgy@cs.brown.edu (Curtis Yarvin) writes: [cooked mode bashing...] > >Cooked mode is obsolete. It was originally an efficiency hack to reduce I/O >processing; this has long been a marginal optimisation. Any text interface >written today should use the GNU "readline" libraries, or an equivalent. > Call me a Luddite, but I think readline is overkill. We have lots of small programs with command line interfaces, and there was an experiment with readline, and here's my opinion of it: 1. Readline is a disk space pig. The readline library is larger than the entire Bourne shell executable. Thus every little program which uses it will be around 100K bytes or more. 2. Readline is a memory pig. Since readline messes with heap memory allocation, there is a potential memory leak at every prompt. 3. Readline is a CPU pig. Piping a batch file into a command line is slower when the program uses readline. 4a. Readline is a documentation pig. Until the standard cooked mode and the supported shells have compatible features, the documentation for each program must cover the readline stuff too. And thoroughly too; you can't just mention EMACS or some crufty experimental shell and expect that Joe User has the commands memorized. 4b. Readline violates the principle of least surprise. Since Joe User doesn't have documentation or help for the readline features, he is baffled when mistyping a magic character exposes some complex and stateful behavior. 5. Typing readline commands accidentally at a non-readline prompt can cause major unwanted effects on other computer systems. On the other hand, backspace seems to be universally portable. (except to EMACS :-) 6. Readline is CS friendly, not user friendly. It makes the computer more interesting without providing meaningful productivity improvement. The delete-character feature of cooked mode is necessary and sufficient for command line editing. Kill-line is the next most useful feature. They're good enough to get the job done. ----- Robert Heiss rob@wilbur.coyote.trw.com