$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Boost.Test updates in trunk: need for (mini) review?
From: Ian Emmons (iemmons_at_[hidden])
Date: 2012-10-26 08:41:50
On Oct 19, 2012, at 11:03 PM, Gennadiy Rozenal wrote:
> It's been a long while since I merged any changes into boost release and by
> now there are whole bunch of new features there. Some are small, but some 
> others are big ones such that they can change the way people use the library. 
> I'd like to list them here (excluding bug fixes and removal of deprecated 
> interfaces) and ask what should we do with these. Specifically let me know 
> if you think these require some kind of (mini) review from community, but any 
> other comments are welcome as well.
Excellent stuff!  Thanks for this work.  I have a couple of comments.
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.
Second, I have below suggested some terminology changes.  (Not for BOOST_CHECKA -- you have plenty of input on that.)  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.
> II. New "data driven test case" subsystem
> 
> <<snip>>
> 
> 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.
> 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.
I also think the choice of operator here is not ideal.  How does the xor operator evoke any notion of this operation?  I would choose bitwise-or "|" because that is sometimes used as a flat-file column delimiter.  (Actually, my favorite choice would be the comma operator to go along with the "tupling" terminology, but who am I to defy Scott Meyers' More Effective C++, Item 7?)
> 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.  Also, I think you mean that the arity is the *product* of the argument dataset arities.
Thanks,
Ian Emmons