Skip to content

[Rcpp-devel] potential new way to expose constructors

5 messages · Andrew Redd, Romain Francois, Douglas Bates

#
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
#
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. Does this mean that we will be able to expose
multiple constructors?
-Andrew

On Sun, Nov 21, 2010 at 12:00 PM, Romain Francois
<romain at r-enthusiasts.com> wrote:
#
Le 21/11/10 20:42, Andrew Redd a ?crit :
Great. I'll wait for Doug's go and switch them.
definitely. as before, but with the new syntax:

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

... etc ...

  
    
#
That's fine with me.  Sorry for the slow response.  I'm down with a
cold or the flu today.

On Sun, Nov 21, 2010 at 1:52 PM, Romain Francois
<romain at r-enthusiasts.com> wrote:
#
Le 21/11/10 21:59, Douglas Bates a ?crit :
Done. I've also updated wls and RcppModules accordingly.
You replied in less than two hours. It does not really qualify as slow ...

Good luck with the cold.