[Rcpp-devel] Unit Test Question Was: pnorm/qnorm?
Dirk Eddelbuettel
edd at debian.org
Thu Sep 13 18:20:37 CEST 2012
On 13 September 2012 at 08:56, Tim Triche, Jr. wrote:
| conclusion: Romain Francois is an absolute beast of a programmer
|
| A stupid-ish question: how do ReferenceClasses map onto Rcpp objects?
| Have people done this? Where can I look for examples?
I wish I had a better answer for this but here goes:
- S3, S4, ReferenceClasses are all pure R constructs
- Rcpp has some support for S4, S3 you can do on the fly (just set an
attribute)
- Rcpp modules creates you something that is a reference class
- Besides Rcpp modules, we have beginnings of 'Rcpp classes' that allow you
to extend C++ classes (brought in via Rcpp modules) on the R side; of
course only the R side sees new members.
| Also, are other people who use Rcpp falling into the habit of using
| '=' instead of '<-' for assignment in R, so that moving code to C++
| goes more smoothly?
I am firmly in the 'Don't do '=' for assignment, ever' camp.
| Is there any real downside to this habit? It came up at the BioC
| conference developer day this year and was more or less immediately
| dismissed.
Just say no.
Dirk
| Thanks all,
|
| --t
|
|
| On Thu, Sep 13, 2012 at 6:24 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
| >
| > On 13 September 2012 at 04:58, Christian Gunning wrote:
| > | On Wed, Sep 12, 2012 at 7:59 AM,
| > | <rcpp-devel-request at lists.r-forge.r-project.org> wrote:
| > | >
| > | > The "pixie dust" referred to your assertions that we "used some secret tools"
| > | > or "were hiding something".
| > | >
| > | > Neither one is true. It's all there. It's just damn hard to read. But it's
| > | > not hidden...
| > |
| > | I'm officially of the opinion the template code is isomorphic to magic
| > | pixie dust: works, works well, don't really understand it.
| > | I've been meaning to ask, though... what's with the conspicuous lack
| > | of comments in the codebase? Is this just a terse coding style?
| >
| > There are some comments in some places. Generally speaking, not enough
| > though. But if you to the sources and recurse through inst/include/ and src/
| > and count lines you end up with ... 60,000 lines. That's a lot.
| >
| > And a good deal of it was written by Romain in a fairly short and insanely
| > productive period. And on the margin I'd rather have working code than more
| > documentation and less code ...
| >
| > And we do have eight vignettes though (including the one you lead :-) so it's
| > not all lost. And then again, if need to make a difference between
| > __interfaces__ which clearly documentation for users and __implementation__
| > which does need it less.
| >
| > Dirk
| >
| > --
| > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| > _______________________________________________
| > Rcpp-devel mailing list
| > Rcpp-devel at lists.r-forge.r-project.org
| > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
|
|
|
| --
| A model is a lie that helps you see the truth.
|
| Howard Skipper
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list