4 ms·
I don't think you can write a DLL/dylib in D to work with Python, since D has a GC (actually, it looks like maybe use of the GC can be worked around with some c
by kbaker 10y ago
I don't think you can write a DLL/dylib in D to work with Python, since D has a GC (actually, it looks like maybe use of the GC can be worked around with some careful programming in D. Still, the D runtime itself may conflict.) From the article:
> In that case, your requirements to the language are pretty harsh: it must not have an invasive runtime, must not have a GC, and must support the C ABI. Right now, the only languages I think that fit this are C, C++, and Rust.
- Volt 10y agoI'm sceptical. I highly doubt GC matters here at all. The runtime restrictions might be the author's own requirements.
- dikaiosune 10y agoI would wager this has more to do with the potential for 2 GCs to interact poorly than with GC in general.
- the_mitsuhiko 10y agoI am not intelligent rnough to contemplate about the ramifications of teo independent GCs having control over their own memory and making that work together well. I'm sure there are ways but it's definitely not easy and not something I would just try on a whim.
- deleted 10y ago[deleted]
- FraaJad 10y agoYou can write DLL/dylib in D to work with Python: http://pyd.readthedocs.io/en/latest/functions.html http://pyd.readthedocs.io/en/latest/functions.html You can opt-out of D's GC. Turn on `-vgc` flag during compilation and replace GC'd code with non-GC'd code and you are not using any GC.
- kbaker 10y agoOh cool, I did not see that library. Looks like it is pretty straightforward, nice!