For review: Term display helper

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Mar 2 02:08:15 AEDT 1998


On 28-Feb-1998, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> > 
> > On 27-Feb-1998, Waye-Ian CHIEW <wchi at students.cs.mu.OZ.AU> wrote:
> > > Hello.
> > > 
> > > This is the term display helper, which takes univ terms and displays them in a
> > > choice of pretty formats.
> > > 
> > > It is not finished and not really useable;  some critical additions, like
> > > the scripting language and the interactive browser, haven't been implemented
> > > yet. 
> > > 
> > > -- Ian!!
> > 
> > Uh, the scripting language?!?
> > 
> > Does it make the coffee too?  How about a builtin mail reader? ;-)
> 
> Of course it makes coffee.  Why else would it be called critical? ;-) ;-)
> 
> 
> > I'm not sure that it would be a good idea to reuse "cd" as the name
> > for this command.  Something else might be a better idea.
> > Perhaps "goto".
> 
> IMO, the analogy with directory trees is a good one.  In particular,
> I imagine users would like to be able to refer to both absolute and
> relative "pathnames".  If a name is to be reused, "goto" is probably
> a less helpful choice.
> 
> Still, "cd" means "change directory" so unless you are actually going
> to refer to subterms as directories all the time, this acronym may
> be misleading.

Yep.  The right acronym to use would be something like "cst",
for "change subterm". 
"cd" is wrong, since what you're changing is not a directory.

I could live with either "cst" or "goto".

> > > X   quit
> > > X      Quits and returns the user-modified visibility tree and
> > > X      preferences to the caller.
> > > X      
> > > X   quit! 
> > > X      Quits and returns the original visibility tree and user
> > > X      preferences to the caller.
> 
> There's not much typographical distance between these two, considering
> that one of them saves and exits, while the other forgets changes.
> 
> How about:
> 
>     done
> 	Exit with user-modified visibility tree and prefs
> 
>     quit
> 	If no changes have been made, quit and return the original
> 
>     quit!
> 	Quit and return the original, forget any changes
> 
> and appropriate abbreviations.

On the topic of consistent user-interface design, why is it that
in vi, "q" means "quit without saving" and "x" means "quit and save",
whereas in mail, elm and mutt, "q" means "quit and save" and "x"
means "quit without saving"?

Is a term display helper more like an editor or more like a mail reader? ;-)

> There seems to be two distinct ways that you would want to output
> a term:
> 	- so that it can be parsed to retrieve the original
> 	  (guaranteed for _any_ term for which this is possible)
> 
> 	- so that it looks neat and is convenient for a human to
> 	  read

If only it were that simple!

With regard to the first way, there are many options:
	- in text, or in binary?
	- in portable format, or in a platform (OS, architecture,
	  compiler, compilation flags, etc.) specific format?
	- high redundancy or minimal redundancy?
	  (e.g. do you include the type of each subterm,
	  in case the types in the program change between
	  when the term is written and when it is read)
	- do you preserve sharing?
	- do you introduce sharing?
	- what about other forms of compression?  Should
	  the implementation optimize the representation 
	  for time or for space?

There are also a large number of different options with regard to the
second way.

> It is hard to satisfy both with one predicate (anybody got any ideas?).

I don't think we should try.
Even three (io__print, io__write, io__write_binary) may not be enough.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list