<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>Le 17 avr. 2014 à 09:42, Hao Ye <<a href="mailto:hye@ucsd.edu">hye@ucsd.edu</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div>Hi Romain,</div><div><br></div><div>Thanks for the explanation -- I was curious about the difference between Rcpp and Rcpp11, as well.</div><div> </div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;">
What might help you deciding is that in Rcpp11, we did not retain some features such as modules and date/time related classes. If your code uses these, then you should probably either stick with Rcpp or start motivating me for adding something along the lines in Rcpp11. There is still a need for something like modules, but not with this implementation.</blockquote>
<div class="gmail_extra"><br></div><div class="gmail_extra">Does this mean that there will be some other mechanism for exposing c++ classes to R? Maybe in some way that supports inheritence? ;)</div></div></blockquote><div><br></div><div>Yes. Problems with Rcpp modules are: </div><div>  -  the way you express things is limited by C++ grammar. It was fun and challenging to write it. But experience of teaching modules shows that the concepts are somewhat hard to grasp. </div><div>  - it is very demanding in terms of resources</div><div><br></div><div>In the future, I’d like to look into code generation (a la attributes) as a mean of exposing classes. So we need something expressive enough. My current blue sky line of thinking about this is that I’d like to have some sort of intermediate language between R and C++. John has done something similar with the exposeClass in Rcpp. <a href="https://github.com/RcppCore/Rcpp/blob/master/R/exposeClass.R">https://github.com/RcppCore/Rcpp/blob/master/R/exposeClass.R</a></div><div><br></div><div>It goes in the right direction, but this time you are limited by R’s grammar. This has been on my radar for some time, but I think having a class system that is nice to use in R requires some grammatical changes. It is unlikely that I will have the leverage to change R’s grammar, but what I can work on is an intermediate language that generates R code. </div><div><br></div><div>In any case, Rcpp11 still has the external pointer class template, so we can « write modules by hand ». </div><div><br></div><div>Romain</div><div><br></div></div></body></html>