[Rcpp-devel] sourceCpp issue: code vs. file

Hadley Wickham h.wickham at gmail.com
Thu May 23 16:26:34 CEST 2013

> | So maybe sourceCpp could provide a warning if the extension is not in that list?
> Hmpd. I am not exactly sure why you advocate supporting .c or .f, .f90, .f95,
> .m and .mm none of which are likely to work _in any way_ with the parsing
> done and scaffolding added by sourceCpp.  When you read 'sourceCpp', mentally
> stress the last three letters.
> This is for R and C++.  And the file extension is .cpp (with a bit of luck
> you may get .cc).
> The rest is user error.  You can't try and catch everything.

You can't catch everything, but can you try ;)  Given that people are
used to writing C++ with a variety of extensions, it seems like a
simple check here would be useful, especially given the otherwise
opaque nature of the error.



Chief Scientist, RStudio

More information about the Rcpp-devel mailing list