Boost logo

Boost :

From: Pravin Gaikar (pravingaikar_at_[hidden])
Date: 2001-08-21 07:01:18


 i am new user to yahoo groups. By mistake i have
entered in your group "boost_at_[hidden]"

Plz help me, my mail box get full with your mails.

What should i do so that i can stop mails receiving
form you groups.

Plz send me your replay on my new email ID
    "pravin_gaikar_at_[hidden]"

bye...

 --- Peter Dimov <pdimov_at_[hidden]> wrote: > From:
"John Max Skaller" <skaller_at_[hidden]>
> > > No, this is not an abuse of inheritance.
> xml_text IS-A xml_element, and
> > > xml_element is fully abstract. I'm using a
> 'constrained' variant where
> the
> > > set of possible types is limited to those
> derived from a common base.
> >
> > Contradiction. If an xml_text is_a xml_element,
> there cannot
> > possibly be any reason to constrain the derived
> types, and there
> > cannot possibly be any reason to call it a
> variant, since there
> > are no operations specific to the type not
> represented
> > in the abstraction.
>
> We're using the 'variant' term in different ways, I
> suppose.
> variant<xml_element> in the example means 'a
> discriminated union that is
> able to hold any object of type that is derived from
> xml_element.' I can use
> xml_element operations on such a variant directly,
> or I can switch-on-type
> and use xml_text-specific operations as long as the
> held object is a
> xml_text instance.
>
> > You need to understand what a variant is.
>
> I know about ML discriminated unions. They can be
> approximated in C++ by
>
> discriminated_union<xml_text, xml_tag> u;
>
> but the approximation obviously isn't a real ML
> union since it isn't
> statically checked.
>
> My variant<> (and Kevlin Henney's boost::any) solve
> a different problem.
> They are used to implement dynamically checked
> polymorphic values - the
> thing you need when you're implementing a language
> where variables are
> called $fish and $frog.
>
> When implementing a statically-typed language such a
> variant doesn't provide
> much benefit over void* and static_cast since you
> know that the language
> compiler has already enforced the type safety.
>
> I have found the non-ML, dynamically typed variant
> quite convenient,
> especially when porting, for instance, PHP code to
> C++. It also enables
> "poor man's typesafe vararg functions" taking
> std::vector<boost::any>.
>
> --
> Peter Dimov
> Multi Media Ltd.
>
>
> Info: http://www.boost.org Unsubscribe:
> <mailto:boost-unsubscribe_at_[hidden]>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>

____________________________________________________________
Do You Yahoo!?
Send a newsletter, share photos & files, conduct polls, organize chat events. Visit http://in/ groups.yahoo.com


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