|
Boost : |
Subject: Re: [boost] [xint] Boost.XInt formal review
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-03-09 15:19:07
Steven Watanabe wrote:
> On 03/03/2011 09:33 AM, Stewart, Robert wrote:
>
> > The use of imperative programming to control what should be
> > distinguished at compile time is disturbing. The runtime
> > overhead may be provably insignificant, but I'd like to see
> > that proved and documented. For example, most functions
> > contain "if (Nothrow) { ...} else { ... }". That means
> > there is a great deal of code carried in either case that
> > never executes. The branches also mean there is more
> > opportunity for bugs to creep into one variant and not the
> > other. An application that only uses
> > integer_t<options::nothrow> instances, there is a lot of
> > code in those else branches that isn't needed. Far better
> > would be for no_throw_integer to derive from integer_t.
> > Changing this aspect, if performance and binary size tests
> > show it to be important, may affect the set of types or
> > interfaces in the library, and must therefore be done
> > before acceptance.
>
> Frankly, I don't see why this is important. I don't
> really care how the library selects the correct
> implementation. The interface is fine from a
> user's point of view.
Curious. I thought I listed quite a number of reasons that are important such as reducing the likelihood of bugs. Note two additional reasons: the current author may not be the only maintainer in the life of the library and library clients may find themselves stepping through the code when debugging problems. Both make simpler, less redundant code desirable.
_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk