Boost logo

Boost :

From: Nathan Myers (ncm_at_[hidden])
Date: 2000-07-27 19:52:52


On Wed, Jul 26, 2000 at 05:00:45PM -0400, Beman Dawes wrote:
> John Maddock wrote:
> >BTW there is some difference of opinion on names here: I tend to
> >prefer something with "assert" in the title, Steve (and others I
> >think) have gone for "postulate", any preferences?
>
> "postulate" sounds a bit pompous. How about "require"?

To choose a name, we should consider how it will be perceived by
people trying to read unfamiliar code. Maybe they just encountered
"boost::" and haven't memorized everything in it yet. How can we
help them?

The prefix "ct_" is an example of the worst kind of abbreviation:
it conveys nothing if you don't already know what it means, and
adds nothing if you do. I'd like to see a Boost rule against
non-standard acronyms in names.

I would strongly object to "postulate" because it sounds like just
speculation. By the above criterion "guarantee" and "warrant" work
better than "require" for me. (A hackish choice would be "ascertain",
because it sounds a lot like "assert".)

Something that implies a "fait accompli" would be better, implying a
static condition rather than an action to perform. Then, we can
consider "checked" "proven", "verified", "known", "required". However,
grammatical correctness is why "assert" works so well, and none of
these last satisfy it.

Maybe what we really mean is "depends_on". The statement connects to
the reality that we put the statement there precisely because some other
code depends on that condition being true. It might lead coders to
answer the implied question, in a comment, of what code does depend on
the condition, and might even prompt a maintainer to change the code
so as not to depend on it, and be the more portable thereby.

A side issue... it appears to me that the proposed expression would
not be appropriate for use in header files. Am I right?

Nathan Myers
ncm at cantrip dot org


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk