On Thursday, 10 December 2015 at 13:33:07 UTC, Pradeep Gowda
wrote:
I read this post about the difficulties of using go/cgo to
interface with C code:
http://www.cockroachlabs.com/blog/the-cost-and-complexity-of-cgo/
How does D do in comparison? specifically in regards to:
1. Call overhead (CGo is 100 times slower than native Go fn
call)
2. Memory management. (I guess D is not immune from having to
manage memory for the C functions it calls.. but is there a
difference in approach? is it safer in D?)
3. Cgorountes != goroutines (This one may not apply for D)
4. Static builds (how easy/straight-forward is this in D?)
5. Debugging (ease of accessing C parts when debugging)
Some reading:
https://dlang.org/spec/interfaceToC.html
http://wiki.dlang.org/D_binding_for_C