Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!husc6!hao!ames!ptsfa!ihnp4!inuxc!iuvax!pur-ee!uiucdcs!uxc.cso.uiuc.edu!ccvaxa!dparter
From: dparter@ccvaxa.UUCP
Newsgroups: comp.lang.c
Subject: Re: Defining TRUE and FALSE
Message-ID: <28700016@ccvaxa>
Date: Wed, 22-Jul-87 21:59:00 EDT
Article-I.D.: ccvaxa.28700016
Posted: Wed Jul 22 21:59:00 1987
Date-Received: Sat, 25-Jul-87 11:06:17 EDT
References: <13851@watmath.UUCP>
Lines: 33
Nf-ID: #R:watmath.UUCP:13851:ccvaxa:28700016:000:1234
Nf-From: ccvaxa.UUCP!dparter    Jul 22 20:59:00 1987


steele@unc.cs.unc.edu writes:
[ refering to flag variables ... ]
> It's often more useful to have each use be a toggle (W_flag = !W_flag).
> The default value of the flag can then be reversed by use of an alias or
> an environment variable without locking the user into that default
> choice.

This is a double-edged sword:

	Suppose a `new' command (foo) is built on top of an existing, 
	well-known command (bar) using some of bar's 'toggle' flags, and 
	the documentation for foo says something like this:

		"... all other options are the same as for bar."

	The well-versed user, who knows that the flags for bar are
	really toggles, can use "foo -flag" to reverse the decision to make
	"-flag" the default.

	The typical user, knowing that he wants the "-flag" option when he 
	uses bar, not knowing it is the default for foo, nor that it is a
	toggle, uses "bar -flag" -- which does the exact opposite of what
	he wanted.... This situation is made worse by documentation that
	does not make it clear that the flags are really toggles, and by the
	indirection in the foo documentation.

--david

David W. Parter
gould/csd - urbana
uucp:	ihnp4!uiucdcs!ccvaxa!dparter
arpa:	dparter@gswd-vms.arpa --or-- dparter@gswd-vms.gould.com