> 1) Write an equivalent d file that mimics the header file of the c library you want to call into. 2) Call the function
FYI, another language which works like this, and which has a syntax even closer to Python, is Nim: https://nim-lang.org/
It even has a tool to automatically translate C headers to Nim.
A downside is that it's much less mature than D, but an upside is that its metaprogramming is more powerful.
I used to play around with D a lot, but now Nim is my favorite language for hobby-level system programming. Not sure what I would do if I was doing professional programming though.
Edit: Nim is also closer to C, in that it's not object-oriented in the way D is (C++ style object-orientation). In D, you associated methods tightly to the data structure, in Nim, like C, there's no such thing. But in Nim, you can call any function "foo(x)", using the "x.foo()" syntax instead. Personally I prefer this. C++ style object-orientation is arguably not very elegant, although it is wide-spread and easily understood by many.
> In D, you associated methods tightly to the data structure, in Nim, like C, there's no such thing. But in Nim, you can call any function "foo(x)", using the "x.foo()" syntax instead.
D has this, too: https://dlang.org/spec/function.html#pseudo-member