Boost logo

Boost :

From: Yuval Ronen (ronen_yuval_at_[hidden])
Date: 2006-10-07 11:53:16


Nicola Musatti wrote:
> Edward Diener <eldiener <at> tropicsoft.com> writes:
>> Jeff Garland wrote:
> [...]
>>> While I agree consideration of null handling using optional makes sense,
>>> there has been some controversy in the past about the optional
>>> interface...so beaware that this approach may bring criticism from some
>>> people.
>> What better way is there of specifying a database null value being
>> passed to or returned from a column of a particular row other than to
>> use boost::optional is the key question. I believe the criticism of
>> optional in the past regards using it with optional references, but when
>> passing and returning database null values, only values would normally
>> be used.
>
> I think Jeff refers to objections that have been raised about using pointer-like
> syntax for things that are not pointers.

I have to second everyone who favors boost::optional. It's IMO
absolutely the best way of handling null-allowed fields.

Yuval


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