You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My understanding from the documentation is that these should behave in the same way, but I have found at least one (slightly convoluted) example where this is not the case.
This now errors with Error in simpler_inside(rlang::splice(ldots)) : argument "d" is missing, with no default. Looking at the debug, it seems like in this example the "splice" call is passed as the first argument to simpler_fun and then unpacks, and ideally should unpack before that.
I appreciate this example is a little artificial (there's no reason for me to turn the dots into a list here); my actual example involves a function factory where I need to extract the dots to pass to a function.
Perhaps this is me not understanding the differences, but I had thought that splice and !!! should act in the same way here.
The text was updated successfully, but these errors were encountered:
Apologies, is this documented anywhere? The only reference to splice explicitly seems to be here which just says "To avoid this in performance-critical code, use splice() instead of !!!:" which led me to think they were perhaps interchangeable.
My understanding from the documentation is that these should behave in the same way, but I have found at least one (slightly convoluted) example where this is not the case.
(this is in R 4.4.1 with rlang 1.1.4)
This works, but if you replace
simpler
withThis now errors with
Error in simpler_inside(rlang::splice(ldots)) : argument "d" is missing, with no default
. Looking at the debug, it seems like in this example the "splice" call is passed as the first argument tosimpler_fun
and then unpacks, and ideally should unpack before that.I appreciate this example is a little artificial (there's no reason for me to turn the dots into a list here); my actual example involves a function factory where I need to extract the dots to pass to a function.
Perhaps this is me not understanding the differences, but I had thought that splice and !!! should act in the same way here.
The text was updated successfully, but these errors were encountered: