Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site ccvaxa
Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!dual!qantel!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!preece
From: preece@ccvaxa.UUCP
Newsgroups: net.lang.c
Subject: Re: When words are good and when words
Message-ID: <2600008@ccvaxa>
Date: Mon, 5-Aug-85 11:26:00 EDT
Article-I.D.: ccvaxa.2600008
Posted: Mon Aug  5 11:26:00 1985
Date-Received: Mon, 12-Aug-85 02:03:49 EDT
References: <1985@ukma.UUCP>
Lines: 29
Nf-ID: #R:ukma.UUCP:-198500:ccvaxa:2600008:000:1363
Nf-From: ccvaxa.UUCP!preece    Aug  5 10:26:00 1985


> In article <2600006@ccvaxa> preece@ccvaxa.UUCP writes:
> > Unfortunately, the name 'opentest' doesn't imply that the variable
> > named 'foo' has been set to the new fd and that the file is now open.
> > It implies (to me, at least) a test of whether it is possible to
> > open the file.  Now, if you wanted to call it "TRY_TO_OPEN", I would
> > be more likely to interpret the name correctly, but some people might
> > interpret that name as a Boolean indicating whether or not to try to
> > open the file.  Naming is very tricky.  Doing the operation is very
> > clear.
> 
> On the other hand we have somebody saying that a particular word isn't
> clear enough (opentest) and offering up another (TRY_TO_OPEN) saying
> that his is unambiguous.  (I don't quite follow him though, since 
> all EITHER open() or fopen() do is TRY_TO_OPEN a file, returning
> an indicator as to their success, that the indicator is also useful
> in later code isn't important).
----------
What I was TRYING to say was that NEITHER name was very good and that
I thought you should let C look like C and use the 
"if ( (x=fopen(...)) == NULL) {...}" form.  Words are too likely to
mean one thing to me and another to you.  Don't use a macro or
procedure unless it's a useful, clear abstraction of what is being
done.

-- 
scott preece
gould/csd - urbana
ihnp4!uiucdcs!ccvaxa!preece