This is somewhat related to RcppCore/Rcpp#190. The idea is to nest default inside C++ comments so that we can express them as R code rather than C++ defaults.
int foo( std::vector<int> x /*= c(1L, 2L) */ ){
// .... whatever
}
The idea is that the parser recognize /*= and promote that to the formals of the generated R function.
@kevinushey is that something you would tackle since you know a bit more about the internals.
Alternatively, we could think of a way to propagate missingness of an argument instead of converting the default to R code, but I think this would lead to code explosion.
This is somewhat related to RcppCore/Rcpp#190. The idea is to nest default inside C++ comments so that we can express them as R code rather than C++ defaults.
The idea is that the parser recognize
/*=
and promote that to the formals of the generated R function.@kevinushey is that something you would tackle since you know a bit more about the internals.