For review: Term display helper

Peter Schachte pets at students.cs.mu.OZ.AU
Mon Mar 2 10:30:43 AEDT 1998


On Sat, 28 Feb 1998, Mark Anthony BROWN wrote:

> 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

Actually, I think there is an important 3 class:

	- so that it's reasonably neat, and also is complete.

That is, no elision of subterms, no depth limits, etc.  Or perhaps that's
what you meant by your second point, in which case there's a need for

	- so that it's reasonably easy to read, even if that means it's not
	  complete.

It may well be that not all arguments need to be shown even in the case of
showing a complete term.  For example a coordinate term may include both
polar and rectangular coordinate information, but it's sufficient for
completeness to show either.  On the other hand, some arguments of some
terms are not usually very interesting, and so should usually be elided, but
when all information must be shown, they must be shown, too.

Ultimately, the *programmer* should be able to define these two separately. 
Also there should be a way for the *user* to specify which parts of terms to
hide.  Perhaps there should be a way for the programmer to give hints which
serve as defaults, but which the user can override.


-Peter Schachte			| ADA, n.: Something you need only know the
pets at cs.mu.OZ.AU		| name of to be an Expert in Computing. Useful
http://www.cs.mu.oz.au/~pets/	| in sentences like, "We had better develop an
PGP key available on request	| ADA awareness." 




More information about the developers mailing list