Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2010-03-30 13:38:10
Chad Nelson wrote:
>> 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.
I can't buy this, given that pointer syntax is so prevalent in C++
(pointers, iterator, smart pointers).
Boost.Optional is not complicated, very well documented, and very
syntactically clean. Smart pointers are more difficult to understand,
but the smart pointer library seems to be among the most popular Boost
libraries (caveat: my only evidence to this latter claim is anecdotal).
IMHO, any developer should be fine with a Boost.Optional return value
(as long as you reference the documentation, and optionally provide a
brief 2-sentence summary of Boost.Optional), and he/she might even
appreciate the opportunity to learn the utility of another Boost
library. This would remove the necessity of this special NaN value,
noticeably simplifying the interface, implementation, and reasoning of
Sorry to be such a bear; I'm only trying to improve things.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk