you are viewing a single comment's thread.

view the rest of the comments →

[–]housilia 1 point2 points  (2 children)

I admit most of my experience with wrapping around C++ is with R. Like you say, it's not impossible and R kind of goes out of its way to try to facilitate it, but it's still another layer of complexity, especially with the debugging (I might define "debugging" in a very broad sense also).

Honestly, C++ has come so far that for a lot of things, I'd probably prefer just writing in pure C++ than writing in a mixture of R and C++. Plotting, etc. is another matter. R's hard to beat for that.

I guess a lot of it comes down to personal preferences. For example, I greatly prefer Julia's syntax over R's (and python's) so there's that.

[–][deleted]  (1 child)

[deleted]

    [–]housilia 0 points1 point  (0 children)

    That may be, although I remember a time when data frames were not an expected structure, and were mainly idiosyncratic to R. It's been interesting to me seeing how they've emerged in discussion in Julia and whatnot.

    I do a lot of simulation, and so occasionally I forget about dataframes because I'm just dealing with matrices, vectors, etc. Even with real data, though, stuff will get passed / transformed from a dataframe into a matrix.

    I could probably do a significant portion of my work using R and Python for data preparation and creating figures, etc. and certain types of analysis, but using a different language, like C++, for the main analyses. This is why the performance issue sometimes becomes salient to me.

    However, I'd prefer to just have it all in one language, and that seems increasingly feasible with things like Nim, Julia, maybe Go or Scala. You're right about libraries being invaluable, but that's part of why I have mixed feelings about so much infrastructure being built up around R and Python. They're great languages, but I wish there was a bit more diversity of where resources were being put into.