No subject

uunet!research.att.com!doug uunet!research.att.com!doug
Wed Dec 4 20:18:00 PST 1991


Sixteen comparison operators is like 13 levels of precedence.
Who can keep them all straight?

If there are four mutually exclusive outcomes of a comparison, 
then four symbols are enough:

	compare(a,b) {
	case <:
	case >:
	case =:
	case a:
	}

A comparable expression syntax is not hard to invent.  For example

	a!b :> ... :< ... := ... :a ...;
	a!b :>< ... := ...;

If you are addicted to infix operators, even though that is
not the way most machines work, you can make compounds
simply by concatenating the four symbols in any way
you like.  No need to pick exactly 16 spellings.

	a>b
	a=>b
	aa<b
	a>a=b

Doug McIlroy, Bell Labs



More information about the Numeric-interest mailing list