D as an extension language

Bill Baxter wbaxter at gmail.com
Wed Aug 30 20:07:55 PDT 2006


This is just a random musing, but curious if anyone had any comments.

I work mostly in C++ but recently I've been doing more with farming out 
tricky bits to Python so I can develop those parts more rapidly.  That 
works pretty well, but for some things Python is just not fast enough. 
But still, while prototyping at least, I'd rather use a language that's 
easier to develop in than C++.

That's where the question comes in... How about D as an extension 
language?  For the time being, using C++ is a fact of life for a lot of 
people due to extensive dependence on piles of C++ legacy code.  But if 
I'm writing a new module or new functionality, it doesn't matter how it 
does it's thing under the hood as long as it presents a C++ interface to 
the rest of the system.

So how hard is it to do this sort of thing?
What tools are out there to help?
What tools would really be ideal to have but are missing?

It seems like it should be easier than the Python<->C++ connection 
because D understands C ABI.  But most of what I've seen is about how D 
can call C code, not how C++ can call D code.

I think it's worth thinking about.  It is one more way that D could make 
some inroads in a C++ entrenched world.

--bb



More information about the Digitalmars-d mailing list