From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-07-01 21:48:42
Douglas Gregor wrote:
>PyObject*, variant, any -- they're all just union types. Is a union a
>container of one?
Very interesting discussion....
My intuition favors the first view: that variant (union, any, PyObject*)
superclass (superset, union) of all its possible types. It makes perfect
The word "union" says it all.
However, I don't see why "extract" can't be used instead of "cast".
If you think of the variant (or union) as a *union* in terms of sets, then
"extract" seems analogous to *extracting* a subset. This view seems
perfectly logical to me. On the other hand, a cast, in my mind connotes a
conversion from a type to another type which might even involve a conversion
from a totally unrelated type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk