[Rcpp-devel] RObject.asFoo

Dirk Eddelbuettel edd at debian.org
Sat Feb 6 16:16:06 CET 2010


On 6 February 2010 at 15:26, Romain Francois wrote:
| 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 ...

Ok, go for it and nuke it.

Dirk

-- 
  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!


More information about the Rcpp-devel mailing list