Boost logo

Boost :

From: Fernando Cacciola (fernando_cacciola_at_[hidden])
Date: 2005-10-18 13:07:09


Rob Stewart wrote:
> From: "Fernando Cacciola" <fernando_cacciola_at_[hidden]>
>>
>> I wonder what would be the result of the following thought
>> experiment: Please, answer the questions _without_ looking at the
>> answers, and if possible post your initial results; then compare
>> with the answers.
>
> IANAOU either (yet!), but I'll give my answers.
>
> First, I'll describe what I think the right behavior is; this may
> be exactly how optional works now or it may not be. I haven't
> compared this description to optional's documentation.
>
OK. You just described Joel's proposed behaviour, and, from your test
results, it's clear that at least you wouldn't be confused about the fact
that in one case it binds while in the other it doesn't.
Now I wonder how would that be in real code... I mean, in my example you
could infer from the context that 'o' was null in one of the cases... but
what if you can't tell that? you wouldn't be able from context alone to know
the expected effect of assignment. That's real problem don't you agree?

Best

-- 
Fernando Cacciola
SciSoft
http://fcacciola.50webs.com/ 

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