D-Bus service activation and access control

Lawrence D'Oliveiro ldo at geek-central.gen.nz
Thu Aug 3 02:14:23 UTC 2017


On Mon, 31 Jul 2017 23:02:42 -0700, Thiago Macieira wrote:

> On segunda-feira, 31 de julho de 2017 18:20:53 PDT Lawrence
> D'Oliveiro wrote:
>
>> When you write a library, consider that other languages will want to
>> create their own bindings for it. This is easier with a C library
>> than C++.
>> 
>> By all means put a C++ layer on top of a C core. Then those other
>> languages can bypass that C++ layer and build on the C core, taking
>> advantage of their own language-specific cleverness, without having
>> to hack their way through the thicket of C++ cleverness.  
> 
> You can also do the opposite: create a C API for your library that is 
> implemented in C++.

But would that wrapper be something the library developers themselves
would use? If not, then it might not be maintained as well as the
underlying library. And then the quality of other language bindings
suffers as well.

Better to have the core of the library in C. Because that’s common code
that everybody is using heavily, you know it will be well-maintained.


More information about the dbus mailing list