digitalmars.D - writing library in D for Linux and other OSes
- "mrkafk" <mrkafk gmail.com> Feb 14 2013
- Martin Nowak <code dawg.eu> Feb 14 2013
- "mrkafk" <mrkafk gmail.com> Feb 19 2013
Hello, D (complete) newbie here. Being sick of C/C++ I would like to write my next library in D lang. It seems that wrting Win DLL is easy or perhaps workable at least (http://dlang.org/dll.html ), but what about other OSes, Linux at least? And iOS + OS X? Specifically, I need to write library usable from Python. There's PYD, I know, but in general, if I wanted to call that library from other languages using C interface, how well it works in practice? Another issue is GC: can I use D's garbage collection (realtime-like performance is not necessary for my needs) in the library and it will "just work" in say Python code? Or not? Thanks!
Feb 14 2013
Specifically, I need to write library usable from Python. There's PYD, I know, but in general, if I wanted to call that library from other languages using C interface, how well it works in practice?
http://forum.dlang.org/thread/sixndlzafvkehvrcevhx forum.dlang.orgAnother issue is GC: can I use D's garbage collection (realtime-like performance is not necessary for my needs) in the library and it will "just work" in say Python code? Or not?
interpreter and might break at some point (precise collector). It also depends on how you represent the D objects/memory but it's a problem that someone creating a binding should address. You might want to look at LuaD and PyD http://wiki.dlang.org/Libraries_and_Frameworks#Scripting_D_applications.
Feb 14 2013
Another issue is GC: can I use D's garbage collection (realtime-like performance is not necessary for my needs) in the library and it will "just work" in say Python code? Or not?
language's interpreter and might break at some point (precise collector).
Could you elaborate on this point (precise allocator) pls? Do you mean that library written in D will have its own D-provided GC and this will get in the way of either memory allocator or GC of a program using the library?It also depends on how you represent the D objects/memory but it's a problem that someone creating a binding should address. You might want to look at LuaD and PyD http://wiki.dlang.org/Libraries_and_Frameworks#Scripting_D_applications.
Thanks!! I'm looking at this.
Feb 19 2013








"mrkafk" <mrkafk gmail.com>