Closed knapply closed 4 years ago
Without having looked into details, and as much as I hate added Depends: yes!
I do the same in package nanotime
which relies on bit64
and its integer64
class. We use that at work too. R's limited set of types bites us with large ints, and this is the best we have. And I have a good working relationship with Jens (upstream) so thumbs up from me.
simdjson
itself usesint64_t
anduint64_t
for integers."Big-ints" are something I have to deal with on a regular basis, so it would be nice for
RcppSimdJson
to give the user options for handling them.It's easy to check if numbers exceed R's integer type and safely cast accordingly, but I'd like the option to cast them to
character
s orbit64::integer64
. At the R level, it looks something like this:@eddelbuettel Is it acceptable to add
bit64
to theDESCRIPTION
'sSuggests
? I'm not suggesting RcppSimdJson code itself touchbit64
(except for testing), but this flexibility would be nice to have:Underneath the hood it's just an enum-class template argument.
The current implementation can be found in
@cran-dev/inst/include/RcppSimdJson/utils.hpp
and an example R interface can be found in@cran-dev/src/rcppsimdjson_utils_check.cpp
.