[Rcpp-devel] potential new way to expose constructors

Romain Francois romain at r-enthusiasts.com
Sun Nov 21 20:52:27 CET 2010


Le 21/11/10 20:42, Andrew Redd a écrit :
> The init_2 is unnatural.  I would prefer the new syntax.  As I have to
> code that is relying in the init_2 at the moment I'm fine with
> switching it out.

Great. I'll wait for Doug's go and switch them.

> Does this mean that we will be able to expose
> multiple constructors?

definitely. as before, but with the new syntax:

.constructor<double,double>()
.constructor<int>()

... etc ...

> -Andrew
>
> On Sun, Nov 21, 2010 at 12:00 PM, Romain Francois
> <romain at r-enthusiasts.com>  wrote:
>> Hello,
>>
>> I've just commited some code that will potentially make it simpler to expose
>> constructors.
>>
>> Where previously we would do something like
>>
>> .constructor( init_2<double,double>() )
>>
>> we can now do:
>>
>> .ctor<double,double>()
>>
>> We probably don't want to keep both, so I'd like to keep the second solution
>> but to call it constructor, so that we will do:
>>
>> .constructor<double,double>()
>>
>> Is this ok for everybody ? I guess this is only mainly relevant for Doug,
>> Andrew and John anyway at the moment :-)
>>
>> Romain


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/9VOd3l : ZAT! 2010
|- http://bit.ly/c6DzuX : Impressionnism with R
`- http://bit.ly/czHPM7 : Rcpp Google tech talk on youtube




More information about the Rcpp-devel mailing list