I’ve been working on embedr and its successor for about a decade. I used to think the better approach was to call D functions from R, with the main program being written in R, and the bottlenecks rewritten in D.
This makes sense if you’re talking about C or C++. I’ve come to the opinion over time that it really doesn’t make sense if you’re familiar with D. The reason is that D is a better language than R for writing programs big enough to need structure. I’m a fan of static typing, for one thing. Overall, I feel like D has been designed better for those projects.
I’ve also come to the realization that calling R from D doesn’t mean your code will be slow. I’ve found ways to avoid the bottlenecks associated with doing things that way. Now that I have the foundation built up (data structures and important functions) D has become a statistical programming language. I’ll be making an initial release soon. The main thing I have left is to finish the documentation.