Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2005-06-30 05:53:14


Hi, Joe

Greer, Joe wrote:
>>From: David Abrahams <dave_at_[hidden]>
>>
>>>Rob Stewart <stewart_at_[hidden]> writes:
>>>
>>>> When classifying types, it is often necessary to test for any
>>>> one of several variations of an aspect. A common case is
>>>> ignoring an aspect which means to allow a match for any
>>>> variation of that aspect
>>>
>
> Please excuse me for jumping into the middle of this discussion. I am
> only a budding metaprogrammer, so that influences how I read things like
> this, so bear with me. With this phrasing,

Being unfamiliar with a topic is a very valuable for a proof-reader (unfortunately
also "fragile" because humans -- and especially those reading this list -- tend to
learn quickly ;-) ).

However, I don't believe this particular case is metaprogramming-specific -- let's
clear up the logic, first:

> it is unclear to me whether
> the common case is "ignoring an aspect" or if it is really "allowing a
> match for any variation of an aspect"

Given a variable 'a' which can be either '1', '2' or '3' it doesn't make a difference:

    if ((a == 1) || (a == 2) || (a == 3)) // match any variation of a
    {
      // do something
    }

is logically equivalent to

    // no if -- just ignore a
    {
      // do something
    }

> which I can do by "ignoring an
> aspect."
>

Equivalence is commutative:

You can ignore 'a' by allowing any variation and you can allow any variation by
ignoring 'a' -- no difference, again.

Making any difference would be talking about implementation details in a parapraph
about plain logic.

>
>>Neither quoted sentence seems long or complex. Perhaps there
>>was something you snipped to which you were referring?
>>
>>Here's the full text of my suggestion:
>>
>> When classifying types, it is often necessary to test for any
>> one of several variations of an aspect. A common case is
>> ignoring an aspect which means to allow a match for any
>> variation of that aspect and is only useful when also testing
>> for other aspects. Ignoring an aspect means using an
>> "unspecified_*" tag. For example, allowing a match for any
>> decoration requires using the <tt>unspecified_decoration</tt>
>> tag.
>>

I have the following problems with this:
- it's too long for a single paragraph
- 80% focusses on a special case
- it's not enirely true that it is /only/ useful testing for other aspects

>
>
> In this paragraph, you are telling me that "ignoring an aspect" is
> "allow a match for any variation of that aspect" (sentence 2) and that
> "ignoring an aspect" is "using an "unspecified_*" tag" (sentence 3).
> The use of "means" in both sentences is awkward. It is also unclear
> that "allow a match for any variation of that aspect" is actually the
> same as "using an unspecified_* tag."
>
> I tend to be more conversational in my writing, but I would be tempted
> to write something like:
>
> When classifying types, it is often necessary to test for any one of
> several variations of an aspect. A common case is allowing a match for
> any variation of an aspect. This is done by ignoring that aspect and is
> implemented by using an "unspecified_*" tag. For example, to allow a
> match
> For any decoration would require using the
> <tt>unspecified_decoration</tt> tag.

This one suffers similar problems (error propagation).

>
> I just wanted to throw in my $.02. I'll go back into lurker mode now.
> :)
>

Since my top-candidate is a different one (and the discussion on one paragraph
splinters too much to be helpful), I just posted an updated version of the whole
section on tag types.

I'ld really like to know if it works for you!

Thanks,

Tobias


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