Boost logo

Boost :

Subject: Re: [boost] Boost.Test updates in trunk: need for (mini) review?
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2012-10-26 20:03:16


On Oct 26, 2012, at 8:41 AM, Ian Emmons <iemmons_at_[hidden]> wrote:

> On Oct 19, 2012, at 11:03 PM, Gennadiy Rozenal wrote:
>
> First, __please__ pay attention to documentation. I know you have said that documentation isn't something you like/want to do, but a library without good documentation is useful only to the writer. In other words, it is (in a general purpose case like this) simply a waste of time.

He didn't suggest that there would be no documentation; only that he hadn't done it and would like help.

> Some believe that a name is only a name, but I disagree. Choosing names carefully is, in my opinion, a powerful means of communication and documentation.

+1

>> d) join - dataset constructed by joining 2 datasets of the same type
>>
>> int a[] = {1,2,3};
>> int b[] = {7,8,9};
>> data::make(a) + data::make(b) - dataset with 6 integer values
>
> This should be called "concatenation", not "joining". People with a database background will expect something called "join" to increase the arity of the result.

Be careful about generalizing from the specific.

>> e) zip - dataset constructed by zipping 2 datasets of the same size, but not
>> necessarily the same type
>>
>> This dataset has an arity which is sum of argument dataset arities.
>>
>> int a[] = {1,2,3};
>> char* b[] = {"qwe", "asd", "zxc"};
>>
>> data::make(a) ^ data::make(b)
>> dataset with 3 samples which are pairs of int and char*.
>
> Calling this "zipping" is odd (at least to me). Makes it sound like a compression facility. Perhaps "tupling" would be better.

Tupling sounds very odd to me. "Zipping" is well established for merging of this sort.

> I also think the choice of operator here is not ideal. How does the xor operator evoke any notion of this operation?

The circumflex has two tails that merge at the top.

>> f) grid - dataset constructed by "multiplying" 2 datasets of the same different
>> sizes and types type
>>
>> This dataset has an arity which is sum of argument dataset arities.
>>
>> int a[] = {1,2,3};
>> char* b[] = {"qwe", "asd"};
>> double c[] = {1.1, 2.2};
>>
>> data::make(a) * data::make(b) * data::make(c)
>> dataset with 12 samples which are tuples of int and char* and double.
>
> For people with a database background, "cross product" is the obvious name for this. Calling it anything else is silly.

Not only is "cross product" wrong, but you should not call the OP for having a different idea than you.

___
Rob


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