Boost logo

Boost :

Subject: Re: [boost] [review][assign] Formal review of Assign v2 ends today
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2011-06-26 13:24:35


John Bytheway wrote:
> Despite the end of the review, please feel free to discuss the library
> further, make any final comments, or even submit a late review.

I'm afraid I got as far as the first page of the documentation, saw the
example, and decided that it was not for me.

The fact that C++ is an ISO standard with multiple implementations and
a decade-long gestation for new language features has both advantages
and disadvantages. One of the disadvantages is that when we have an
idea that would best be implemented in the core language, unless we're
prepared to wait for a decade or to fork the language ("D"), we have to
try to shoe-horn the feature into existence as a library. The results
are often, in my opinion, syntactically unappealing. The question is,
are such things better than nothing? For something as simple as
assignment, I could not support anything whose meaning was not
immediately apparent from the code:

     std::vector<int> v = { 1,2,3,99,42,0 }; // [*]
     std::map<int,string> m = { {1,"hello"}, {2,"world"} };

If that can't be achieved with the core language as it currently
exists, then I'd rather leave it and write it out longhand; I'd prefer
type a few more keystrokes today than have someone look at my code in 5
years time and not have a clue what it was doing.

Of course, the fact that something is "not for me" does not mean that
it is not suitable for Boost. Surely there must be users of assign v1
out there who could express an opinion?

I think we need to initiate another round of "why are there not enough
reviews?" discussions, which will get more people posting than any
reviews ever do....

Regards, Phil.

[*] Actually, even that isn't immediately apparent; is that 0 at the
end a required sentinel, in the style of obective C's NSArray
constructor: [NSArray arrayWithObjects: a,b,c,d,e,nil], or is it one
of the elements to be assigned?


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