Boost logo

Boost :

From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2019-10-22 21:03:43


On Tue, Oct 22, 2019 at 1:50 PM Andrey Semashev via Boost
<boost_at_[hidden]> wrote:
> it encourages constantly reinventing the wheel and monolithic design

We're talking specifically about the JSON parser not the other
components, and yes, this is intentional. "monolithic design" is a
desirable feature of algorithms which are exposed to untrusted inputs.

> Imagine if every library in Boost had its own copy of e.g. shared_ptr.

That's not the same scenario. `shared_ptr` is not exposed to untrusted
inputs. If JSON were to use Spirit, then the amount code requiring
audit would be much larger. The tradeoff here makes it worth eschewing
Spirit even at the expense of some redundancy.

Furthermore json::basic_parser is optimized to work well for
incremental inputs, Spirit on the other hand is not. But I'm no Spirit
expert so if someone wants to show me how a Spirit based parser can
match the hand-rolled version feature for feature at the same or
better performance, that would be quite interesting.

Thanks


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