egnha / valaddin

Functional input validation to make R functions more readable and robust
Other
33 stars 1 forks source link

Support dot-splicing in firmly #46

Closed egnha closed 7 years ago

egnha commented 7 years ago

Use dot-splicing (rlang::dots_splice()) to simplify the cumbersome argument signature

function(f, ..., checklist = list(), error_class = character())

to

function(f, ..., error_class = NULL)

(That is, allow lists of checks to be automatically spliced when included in ....)

egnha commented 7 years ago

rlang::dots_splice() won't work, because it uses bare evaluation. Stick to rlang::quos() and rely on explicit splicing semantics (using !!!/UQS()).