[Rcpp-devel] Sugar

Romain Francois romain at r-enthusiasts.com
Mon Nov 1 16:08:06 CET 2010


Le 01/11/10 15:57, Shane Conway a écrit :
> My two cents:
>
> That seems sensible; an alternative view would be to say that sugar is
> in the same vein as the rest of Rcpp, might regularly be used in the
> same code, and the goal should be to keep everything as simple as
> possible (i.e. one library).  I, for one, don't see the need to
> separate them.  They're very tightly coupled.

They definitely are.

The main magic behind sugar is the Rcpp::VectorBase template class that 
implements the necessary CRTP wizardry.

classes such as NumericVector are derived from VectorBase, so Rcpp needs 
sugar.

Also, order of imports matters and can get messy in C++. So I think 
users appreciate that we take care of it for them.

> On Mon, Nov 1, 2010 at 1:13 AM, Dominick Samperi<djsamperi at gmail.com>  wrote:
>> Comments on Sugar...
>>
>> Rcpp sugar seems to be an enhancement for C++ more than an interface
>> function,
>> so wouldn't it make sense to maintain it as a separate C++ class library?
>> More generally, it would be useful to know what portions of Rcpp can
>> function without the R engine running. This can be determined by
>> trial and error, but it might be helpful if the boundary was more
>> clearly defined. Another possible advantage is clients could link only
>> against code that they really need.
>>
>> Thanks,
>> Dominick


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/czHPM7 : Rcpp Google tech talk on youtube
|- http://bit.ly/9P0eF9 : Google slides
`- http://bit.ly/cVPjPe : Chicago R Meetup slides




More information about the Rcpp-devel mailing list