[Semi-OT] I don't want to leave this language!

bachmeier via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 7 19:50:49 PST 2016


On Thursday, 8 December 2016 at 02:10:35 UTC, Jon Degenhardt 
wrote:
> A cycle I think is common is for a researcher (industry or 
> academic) to write functionality in native R code, then when 
> trying to scale it, finds native R code is too slow, and 
> switches to C/C++ to create a library used in R. C/C++ is 
> chosen not because it the preferred choice, but because it is 
> the common choice.
>
> In such situations, the performance need is often to be quite a 
> bit faster than native R code, not that it reach zero overhead. 
> My personal opinion, but I do think D would be a very good 
> choice here, run-time, phobos, gc, etc., included. The larger 
> barrier to entry is more about ease of getting started, 
> community (are others using this approach), etc., and less 
> about having the absolutely most optimal performance. (There 
> are obviously areas where the most optimal performance is 
> critical, Mir seems to be targeting a number of them.)

Rcpp is the most common dependency for R packages on CRAN. (I 
actually contributed an example that Dirk went on to use quite 
often, including his book.[1]) That motivated me to do something 
similar for D.[2] I have created other packages, though they have 
less documentation.[3]

It will be important to keep the technical requirements low if 
others are going to adopt D. I use the R package manager for 
everything, because Dub would require them to learn something 
that they'd view as weird. And having to understand memory 
management, as with Rust, would definitely not work. To this 
point I have focused on adding functionality and ease of 
installation so as to get my coauthors to use it. Mir is a 
wonderful project, but those advanced developers are not the ones 
that would embed D inside an R program, and they would definitely 
not feel comfortable with the things a 
statistician/econometrician expects.

[1] http://dirk.eddelbuettel.com/blog/2011/04/23/
[2] https://bitbucket.org/bachmeil/embedr
[3] For example, https://bitbucket.org/bachmeil/dmdgretl, 
https://bitbucket.org/bachmeil/dmdquadprog, 
https://bitbucket.org/bachmeil/dmdoptim


More information about the Digitalmars-d-learn mailing list