Boost logo

Boost :

From: Jeff Garland (azswdude_at_[hidden])
Date: 2023-02-19 20:53:26


Thanks for the detailed clarification. The main thing in my view is that
the map<string,any> part isn't the 'required user interface" like many of
the older library designs.

Jeff

On Sun, Feb 19, 2023 at 10:27 AM Peter Dimov via Boost <
boost_at_[hidden]> wrote:

> Jeff Garland wrote:
> > Just wanted to comment on this here, since boostache was a library in a
> week
> > invention. The most important innovation in boostache in my view was the
> > fact that it did not require conversion of a data structure into a
> map-like data
> > structure prior to output. The classic Google template (a mustache
> engine
> > from years ago) and most others I'd ever seen required this step.
> > Unfortunately, I didn't have time to look at boost::mustache in detail,
> but from
> > my quick look it appears the use of Describe also enables this direct to
> format
> > feature.
>
> As is, the proposed Mustache library does take any "reasonable" UDT as the
> input data. so purely from the user point of view it "works", but
> implementation-wise, this is accomplished by converting the UDT into a
> json::value using boost::json::value_from.
>
> This isn't efficient, but fixing that is nontrivial and has repercussions
> on
> the rest of the library, including future extensions such as the
> aforementioned
> filters.
>
> (Not caring about copies makes the design much more flexible, e.g. the
> user-supplied filter functions can just take and return json::value,
> without
> ever knowing about UDTs.)
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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