[Rcpp-devel] RObject.asFoo

Romain Francois romain.francois at dbmail.com
Sat Feb 6 15:26:33 CET 2010


On 02/06/2010 03:22 PM, Dirk Eddelbuettel wrote:
>
> On 6 February 2010 at 15:08, Romain Francois wrote:
> | On 02/06/2010 02:58 PM, Dirk Eddelbuettel wrote:
> |>
> |>
> |>  On 6 February 2010 at 14:28, Romain Francois wrote:
> |>  | Hello,
> |>  |
> |>  | Now with as<Foo>, we don't need anymore the Rcpp::asFoo() methods. I'd
> |>  | like to remove them from the api.
> |>  |
> |>  | Any objections ?
> |>
> |>  Could we keep them as one-liners a la
> |>
> |>         inline bool asBool() const { return as<bool>(object); }
> |>
> |>  and mark it in RcppSexp.h with a comment that the asFoo are deprecated?
> |>
> |>  Dirk
> |>
> |
> | Sure. I do not mind keeping them in RcppSexp, but I'd prefer top
> | eventually remove them from RObject, but we can do it slowly, deprecate
> | them first, etc ...
>
> Ahh, yes.
>
> | I'm changing RcppSexp so that it uses as<>  directly.
>
> That's good.
>
> In a sense even RcppSexp is deprecated and replace by Rcpp::RObject.

Yes. I has been advertised as such for some time now.

/**
  * This class is DEPRECATED, will be DEFUNCT in a next version and
  * eventually removed from Rcpp.
  *
  * The alternative is to use the Rcpp::RObject class and the set of 
functions
  * Rcpp::wrap.
  */
class RcppSexp {
public:

I don't mind leaving this one on, but I believe that methods asFoo of 
RObject --- which is becoming quite stable now --- should disappear, to 
reduce complexity, number of interfaces ...

> Dirk
>
>


-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/MPYc : RProtoBuf: protocol buffers for R
|- http://tr.im/KfKn : Rcpp 0.7.2
`- http://tr.im/JOlc : External pointers with Rcpp




More information about the Rcpp-devel mailing list