Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-12-10 17:36:23


----- Original Message -----
From: "Joel de Guzman" <djowel_at_[hidden]>

> ----- Original Message -----
> From: "David Abrahams" <dave_at_[hidden]>

> > optional captures the zero/one distinction, which, as its analogy to
> > pointers makes clear, is a very useful one. A type which can contain
> > any number of different types would have a much more complicated
> > interface. Maybe it's just a different library?
>
> Or perhaps, optional is just a limited add-on API over the variant?
> The low-level implementation mechanism in place seems to be very
> similar and having 2 separate libraries will be redundant, I think.

But then of course, we don't have a variant yet. Duh! So,
please take my opinions as just food for thought. Maybe sometime
in the future the optional and the variant may be factored out
to share some common code. Nothing wrong with forward thinking
eh?

As it is, I'll have plenty of uses for the optional. I vote to accept.

Cheers,
Joel de Guzman
joel_at_[hidden]
http://www.boost-consulting.com


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