How does D compare to Go when it comes to C interop?

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Fri Dec 11 02:30:24 PST 2015


On Thu, 2015-12-10 at 20:17 +0000, Ola Fosheim Grøstad via Digitalmars-
d wrote:
[…]
> 

> Go has a more advanced, memory efficient and secure runtime than 
> D fibers. So when calling C Go has to do extra work. E.g. Ensure 
> that the stack is large enough for C etc.

Goroutines are great. They are the single thing that makes Go usable.

Fibres are for cooperative coroutines, they are a very long way from
being the equivalent of goroutines.

std:parallelism has tasks and a scheduler. This is much more like
goroutines, but they are not publicly available.

A good thing to do would be to build an asynchronous task pool system
for D as exists for Java (Quasar), Rust (Eventual), Groovy (GPars) that
is available for all. Fibres are not that system, and should not be
coerced to fill that role. Fibres are for cooperative coroutines and
should stay that way. What is needed is a task pool that can then
harness kernel threads exactly as goroutines do. And Erlang actors for
that matter. And GPars dataflow/actors/CSP.

[…]

In the new year, it may be possible for me to join in an activity on
this rather than just waffling about it.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20151211/733d350c/attachment.sig>


More information about the Digitalmars-d mailing list