Boost logo

Boost :

From: Soronel Haetir (soronel.haetir_at_[hidden])
Date: 2022-04-25 19:45:46


On 4/25/22, Hans Dembinski via Boost <boost_at_[hidden]> wrote:
>
> Why anyone would prefer programming in C over C++ is a mystery to me,
> though, automatic memory management with std::unique_ptr and friends alone
> is such a boon. The C++ interface provided by Boost.Python and pybind11 is
> much easier to use than the original Python C API exactly for that reason.

One major reason for choosing C is that it provides a much wider
compatibility window. That is, it is possible to link C-derived object
files from a much wider set of tools into a single result binary. Even
setting name mangling aside, C++ ABIs changed so frequently that it is
generally unsafe to link C++ objects generated by different toolchains
(often even the same toolchain with different options). C, on the
other hand, has far fewer pitfalls in this regard.

-- 
Soronel Haetir
soronel.haetir_at_[hidden]

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