Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2007-07-13 16:55:28


on Fri Jul 13 2007, Mathias Gaunard <mathias.gaunard-AT-etu.u-bordeaux1.fr> wrote:

> Peter Dimov a écrit :
>> David Abrahams wrote:
>
>>>>> root.push_front(
>>>>> tag("articleinfo")[
>>>>> title ? (comment("This title was moved"), title) : NULL
>>>>> , tag("author")[
>>>>> tag("firstname")["Joe"],
>>>>> tag("surname")["Random"]
>>>>> ]
>>>>> ]
>>>>> )
>>>> Interesting. It doesn't look a lot like raw XML
>>> Maybe that's the point ;-)
>>>
>>>> but it certainly integrates better into C++.
>>> That too.
>>
>> You're optimizing the wrong case, a toy example.
>
> Its best usage is obviously for an XML template, where variables
> directly maps to the contents of an XML structure.

Yes, that's where I've used it most.

> To do that, people usually invent pseudo-languages that integrate
> into XML, but then they end up duplicating full programming
> languages, with an even uglier syntax.

Yep.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
The Astoria Seminar ==> http://www.astoriaseminar.com

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