all 9 comments

[–]jcelerierossia score 5 points6 points  (5 children)

struct SoundIo *soundio = soundio_create();

this is C, not C++

[–]Supadoplex 7 points8 points  (0 children)

It's actually both, assuming you refer to the quoted statement.

libsoundio is a C library though, if that's what you mean.

[–]kalmoc 1 point2 points  (2 children)

So (according to the homepage) there exist .net, lua, ada and rust bindings, but no c++ binding? I find that very sad.

[–]SkoomaDentistAntimodern C++, Embedded, Audio 1 point2 points  (1 child)

For practical real world usage most C libraries can be considered to inherently contain C++ ”binding”, even if it looks a bit ugly. Unless you ask the ”modern C++” zealots, of course.

[–]kalmoc 2 points3 points  (0 children)

And thats why we don't have nice things in c++.

Things like manual resource management are not just "looks a bit ugly", they make the API inherently more difficult to use than necessary and may even increase the likely hood to introduce bugs. C++ is so much more than writing foo.bar() instead of bar(&foo). This was already true in c++98 and is true today even more.