Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-09-02 22:04:10

Fernando Cacciola <fcacciola_at_[hidden]> wrote:

> You did sell the idea that it can be a union, but I held to the idea that
> it can just as well be considered as *REALLY REALLY REALLY*
> nothing else but a container that has a T or is empty.
> I agree there is nothing wrong with the union model, but I don't see
> why is it better than the other.

In fear that this is becoming non-productive and as I've already mentioned
that I respect whatever you decide on (I'm satisfied with the optional regardless
of its quirks), this will be my final post on the issue.

The problem, the way I see it, is that optional mixes at least 3 concepts
all at once. First, the concept of variant<T, nil>, second is the concept
of optional as a container and third (I know you disagree, but) pointer-
like concept. I understand that the optional started out with the pointer-
like concept and moved on to embrace other concepts to satisfy the
needs of people who want some features which do not fit quite nicely
with the pointer-like concept (e.g. == and != and soon direct assignment?).


Joel de Guzman

Boost list run by bdawes at, gregod at, cpdaniel at, john at