IMHO using '*' to represent null violates the Principle of Least
Astonishment. '*' is often used in masking to represent "anything",
which is a long way from null.
How about using NULL to represent null, e.g.,
thing3(option1,NULL) /* This would define another thing and say "even
if you have a default, global value for option2, pretend you don't" */
--
Regards, Gord Tomlin
Action Software International
(a division of Mazda Computer Corporation)
Tel: (905) 470-7113, Fax: (905) 470-6507
On 2012-03-19 17:12, Phil Smith wrote:
In our configuration data set, you can specify a default, global value for
something. Specific entries in the configuration can override that global
value. However, there are cases where you *must* specify a null value on a
specific entry, as if you had no default, global value.
Our internal debate is over whether an asterisk is appropriate to say "No, really,
don't use any value here".
So examples might be:
thing1(option1,option2) /* This defines a thing with an explicit option1 and
explicit option2 */
thing2(option1) /* This defines another thing and says "use the default, global
value for option2 if you have one" */
thing3(option1,*) /* This would define another thing and say "even if you have a
default, global value for option2, pretend you don't" */
thing4(option1,'') /* This is an alternative form of thing3 */
One of us feels that the asterisk should mean "use the global default". One of
us feels that the double quote is ugly and error-prone.
Based on the collective wisdom of the centuries, what *feels* right to you?
--
...phsiii
Phil Smith III
[email protected]<mailto:[email protected]>
Voltage Security, Inc.
www.voltage.com<http://www.voltage.com>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN