Boost logo

Boost :

Subject: Re: [boost] xml?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-04-09 11:48:56


Larry Evans wrote:

> What is there about the XPath specification that makes any type
> hierarchy for modelling it less suitable than using something
> akin to boost.variant?
>
> You see, I'm wondering because using type hierarchies and
> virtual functions has been touted as a great advantage of
> OO programming; yet, it apparently lacks something which
> you need. I'd like to understand what that is.

Some could argue that the point of a base class is moot if you have to
downcast it to make anything useful with it, and that algebraic data
types (variant-like things) are a much more elegant solution when you
need to visit the different cases.


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