Boost logo

Boost :

Subject: Re: [boost] [review queue] What to do about the library review queue?
From: Robert Ramey (ramey_at_[hidden])
Date: 2017-03-15 20:11:47

On 3/15/17 12:24 PM, degski via Boost wrote:
> On 14 March 2017 at 22:25, Robert Ramey via Boost <boost_at_[hidden]>
> wrote:
>> A much more interesting question: Why did you not submit a review
>> yourself? I think it would have been helpful to me as an author and to you
>> in better understanding your own concerns.
> Because I think the idea is flawed from the start.
> int x = 2 * 2;
> is wrong in principle, correct would be:
> int64_t x = 2 * 2;

Hmmm so what's flawed? The C++ standard? This particular program? or ?

right - It's the whole purpose of the safe numerics library to detect
these sort of problems.

> This is what happens in the CPU.

Not all CPUs

> C and C++ are wrong to allow multiplying

> two ints and assign the result to an int (the cpu does not do that!).

Hmmm - but's ok to multiply two 64 bit ints and store it an a 64 result?

> Then
> of course there is the issue of two's-complement, clouding stuff even
> further.
> If one wants to be safe, the only real option is to use bignums (GMP,
> whatever). This is what implementations of languages like prolog and scheme
> do (I'm thinking of SWI-Prolog and Racket f.e.). Shifts (left of right) get
> a whole different meaning...


> Reals (floats, doubles, quads) are already so broken in many ways, that I
> wouldn't even like to comment. Even MPFR doesn't add much here, except
> increased (but still relative) precision.
> I'm of the opinion that the only real option (if one wants performance) is
> to be very aware, learned and carefull regarding the issues, when dealing
> with numbers in C or C++. And this is far from simple, signed zeros,
> subnormal numbers, infinities, NaN's, roundings...

I maintain that this library is helpful, even essential, in
accomplishing the above task. Actually, I don't think it's possible to
do what you want without such a library as this.

It seems to me you're arguing the case FOR using the library rather than
against it! Of course you might be arguing that since it doesn't
address the whole issue - including floats that it's not at all useful.
But it's hard for me to tell.

> One of the review questions is: "would you use it?"
> Sorry, no!
LOL - sure it's free country.

Thanks for your comments, I think they are quite illuminating.

Robert Ramey

PS my original question was: "Why not submit a review yourself?"
There's no reason why you couldn't have submitted your concerns during
the review period. I've always felt that reviews would benefit from
more user feedback - even if I think it's misguided. It can smoke out
other users who have similar concerns and also it can draw to the
surface mis-understandings which can result in clarification of
confusing points in the documentation. One of the things that we're
most proud of here at boost is the generally high level of discourse
where people can feel free to raise their legitimate concerns and
discuss them in a professional way. I'm happy to see you've been able
to note them here, and I would have been even happier to see then during
review period.
> degski
> _______________________________________________
> Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at