Skip to content
Prev 15872 / 63461 Next

Limitations of generic functions

I think the issue is not whether C++/R OO models are better. R serves a
different role in computing than does C++. In my experience, simply
projecting (cloning) a C++ interface directly into R rarely provides
satisfactory results. Figure out what you want to do in R. Encapsulate
the appropriate abstractions using S4 methods and then figure out which
services you want to hand off to the C++ libraries. The low-level
manipulation of R's internal data structures can then be done in C++ in
your extension. Emulating C++ code in R is not much fun.

Ciao,
THK

PS. Sorry for the foo bar quoting. I'm subscribed to the digest. -- T.