|
Boost : |
Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-30 07:13:02
Chad Nelson wrote:
> Someone-else-whose-name-was-elided wrote:
>
> > invmod and random_prime? These hardly seem like
> > fundamental operations that necessitate this "invasion" into an
> > otherwise pure big-integer interface ;)
>
> I have to disagree, only because one of the main reasons
> people want to
> use a large-integer library is for cryptography, and those
> two functions *are* fundamental to that.
"One of the main reasons," not "the only" reason. Hence, cryptography functionality, which surely is more than those two functions, should be in a separate library.
> > Returning optional values is precisely the raison d'etre of
> > Boost.Optional, and you're ending up just building its functionality
> > directly into the xint::integer class, so instead of xint::integer,
> > we really have a boost::optional< xint::integer >. I don't
> > like that
> > :/ What did you find about Boost.Optional that was difficult for
> > users to understand?
>
> That it acts like a pointer but isn't one. Less experienced developers
> often find even pointer syntax hard to master, and unfortunately, they
> are the majority of programmers. I was trying to make it as easy as
> possible for anyone, no matter what their level of experience, to use.
This is being proposed as a Boost library. We can assume enough knowledge to use Boost.Optional, which isn't great.
> > The interface to invmod and random_prime should be built around the
> > interface of xint::integer, not the other way around.
>
> Sorry, not good enough. They're an important part of the
> interface, and their requirements affect it too.
That's not a sufficient reason for their inclusion in a big integer library. Rather, the big integer library needs to be designed well to support those functions and many others.
_____
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